Fix handling invalid archive paths
This commit is contained in:
parent
4c955ef806
commit
5c85c2a1b9
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ static NSString * path_unpack_string(NSString * src, NSRange * remainder)
|
|||
.length = bar.location - 1
|
||||
};
|
||||
NSUInteger length = [[src substringWithRange:lengthRange] integerValue];
|
||||
if (length >= ([src length] - bar.location - 1))
|
||||
return nil;
|
||||
NSRange pathRange = {
|
||||
.location = bar.location + 1,
|
||||
.length = length
|
||||
|
|
Loading…
Reference in a new issue