mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
(ImageFormat.FindFormat): ignore streams less than 4 bytes length.
This commit is contained in:
parent
12d9ea4765
commit
86d9121b94
@ -152,6 +152,8 @@ namespace GameRes
|
||||
|
||||
public static System.Tuple<ImageFormat, ImageMetaData> FindFormat (Stream file, string filename = null)
|
||||
{
|
||||
if (file.Length < 4)
|
||||
return null;
|
||||
uint signature = FormatCatalog.ReadSignature (file);
|
||||
Lazy<string> ext = null;
|
||||
if (!string.IsNullOrEmpty (filename))
|
||||
|
Loading…
x
Reference in New Issue
Block a user