Fix Memory Issues (#4)

* Fix a couple of protection scans (possible mem issues)

* Don't open the file contents on path scan for antimodchip

* IS-CAB intermediate filtering to reduce scan times

* Update NuGet version
This commit is contained in:
Matt Nadareski
2019-10-24 16:09:43 -04:00
committed by GitHub
parent 45661f3ccd
commit 482644af85
4 changed files with 53 additions and 45 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace BurnOutSharp.ProtectionType
{
@@ -11,8 +12,7 @@ namespace BurnOutSharp.ProtectionType
{
if (Path.GetFileName(file) == "CDSPlayer.app")
{
using (var fs = File.Open(file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (var sr = new StreamReader(fs))
using (var sr = new StreamReader(file, Encoding.Default))
{
return "Cactus Data Shield " + sr.ReadLine().Substring(3) + "(" + sr.ReadLine() + ")";
}