Skip to content

Commit

Permalink
Fixed crasher in +pathIsAZip: (Issue #99)
Browse files Browse the repository at this point in the history
  • Loading branch information
abbeycode committed Nov 5, 2019
1 parent 61159ce commit 6f8eae8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# UnzipKit CHANGELOG

## 1.9.1

* Fixed a crasher for unreadable files in `+pathIsAZip:` (Issue #99)

## 1.9

* Added support for `NSProgress` and `NSProgressReporting` in all extraction and iteration methods (Issue #32)
Expand Down
3 changes: 3 additions & 0 deletions Source/UZKArchive.m
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ + (BOOL)pathIsAZip:(NSString *)filePath

UZKLogDebug("File is not a ZIP. Unknown contents in 3rd and 4th bytes (%02X %02X)", dataBytes[2], dataBytes[3]);
}
@catch (NSException *e) {
URKLogError("Error checking if %{public}@ is a Zip archive: %{public}@", filePath, e);
}
@finally {
[handle closeFile];
}
Expand Down

0 comments on commit 6f8eae8

Please sign in to comment.