Do not skip text-based images on NULL, if they're smaller than

512 the test buffer gets NULL-filled.
This commit is contained in:
2017-05-16 07:26:05 +01:00
parent c8d9c4d3c3
commit c8245c9fd5
4 changed files with 4 additions and 4 deletions

View File

@@ -250,7 +250,7 @@ namespace DiscImageChef.ImagePlugins
// Check for unexpected control characters that shouldn't be present in a text file and can crash this plugin
foreach(byte b in testArray)
{
if(b < 0x20 && b != 0x0A && b != 0x0D)
if(b < 0x20 && b != 0x0A && b != 0x0D && b != 0x00)
return false;
}

View File

@@ -322,7 +322,7 @@ namespace DiscImageChef.ImagePlugins
// Check for unexpected control characters that shouldn't be present in a text file and can crash this plugin
foreach(byte b in testArray)
{
if(b < 0x20 && b != 0x0A && b != 0x0D)
if(b < 0x20 && b != 0x0A && b != 0x0D && b != 0x00)
return false;
}

View File

@@ -129,7 +129,7 @@ namespace DiscImageChef.DiscImages
// Check for unexpected control characters that shouldn't be present in a text file and can crash this plugin
foreach(byte b in testArray)
{
if(b < 0x20 && b != 0x0A && b != 0x0D)
if(b < 0x20 && b != 0x0A && b != 0x0D && b != 0x00)
return false;
}

View File

@@ -140,7 +140,7 @@ namespace DiscImageChef.ImagePlugins
// Check for unexpected control characters that shouldn't be present in a text file and can crash this plugin
foreach(byte b in testArray)
{
if(b < 0x20 && b != 0x0A && b != 0x0D)
if(b < 0x20 && b != 0x0A && b != 0x0D && b != 0x00)
return false;
}
gdiStream = new StreamReader(imageFilter.GetDataForkStream());