mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 13:48:57 +08:00
(ImageFormat.FindFormat): ignore streams less than 4 bytes length.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user