Skip to content

Commit 7909767

Browse files
author
ZhuLida
committed
FIX : crash in SVGAParser
1 parent 5c4ba4a commit 7909767

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Source/SVGAParser.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ - (void)parseWithData:(nonnull NSData *)data
184184
}
185185
return;
186186
}
187+
if (!data || data.length < 5) {
188+
return;
189+
}
187190
NSData *tag = [data subdataWithRange:NSMakeRange(0, 4)];
188191
if (![[tag description] isEqualToString:@"<504b0304>"]) {
189192
// Maybe is SVGA 2.0.0

0 commit comments

Comments
 (0)