@@ -26,11 +26,15 @@
case 0x52:
// R as RIFF for WEBP
if ([data length] < 12)
+ {
return nil;
-
+ }
+
NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding];
if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"])
return @"image/webp";
}