tdf#128208: Don't crash if the zip archive is broken
Change-Id: I71f91752e6adeca1970a21c793cad3b5a5aeba13
This commit is contained in:
parent
f8b8005475
commit
d2b36c2674
@ -86,6 +86,8 @@ static unsigned char readByte(NSFileHandle *file)
|
||||
if (tmpBuf == nil)
|
||||
return 0;
|
||||
unsigned char *d = (unsigned char*)[tmpBuf bytes];
|
||||
if (d == nil)
|
||||
return 0;
|
||||
return *d;
|
||||
}
|
||||
|
||||
@ -391,7 +393,7 @@ static NSData *getUncompressedData(NSFileHandle *file, NSString *name)
|
||||
|
||||
if (unzipFile == nil) {
|
||||
//NSLog(@"zip file not open");
|
||||
return YES;
|
||||
return NO;
|
||||
}
|
||||
|
||||
//first get the metadata
|
||||
|
Loading…
x
Reference in New Issue
Block a user