You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have found a crash when trying to extract RAR files with this library.
Steps to reproduce issue (Detailed enough for me to reproduce - attaching a sample archive can be very helpful):
Sadly it is not easy to reproduce, it is something that happens using iTunes on Windows, transferring a file to an app using "File Sharing" and the file name contains some unicode characters, e.g. û.
What you expect to happen:
The file is extracted.
What actually happened:
A crash.
A stack trace or crash report, if you have one:
The problem happens when - (NSURL *)fileURL fails to get the URL in
The method returns nil and that nil ends in - (BOOL)_unrarOpenFile:(NSString *)rarFile inMode:(NSInteger)mode withPassword:(NSString *)aPassword error:(NSError * __autoreleasing *)error causing a crash here self.flags->ArcName = strdup(rarFile.UTF8String);
The library should check if rarFile is nil to avoid the crash.
BUT, it would be nice to find and fix the underlying error that causes NSURL URLByResolvingBookmarkData to fail with Error Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist."
The text was updated successfully, but these errors were encountered:
I have found a crash when trying to extract RAR files with this library.
Steps to reproduce issue (Detailed enough for me to reproduce - attaching a sample archive can be very helpful):
Sadly it is not easy to reproduce, it is something that happens using iTunes on Windows, transferring a file to an app using "File Sharing" and the file name contains some unicode characters, e.g.
û
.What you expect to happen:
The file is extracted.
What actually happened:
A crash.
A stack trace or crash report, if you have one:
The problem happens when
- (NSURL *)fileURL
fails to get the URL inThe method returns
nil
and thatnil
ends in- (BOOL)_unrarOpenFile:(NSString *)rarFile inMode:(NSInteger)mode withPassword:(NSString *)aPassword error:(NSError * __autoreleasing *)error
causing a crash hereself.flags->ArcName = strdup(rarFile.UTF8String);
The library should check if
rarFile
isnil
to avoid the crash.BUT, it would be nice to find and fix the underlying error that causes
NSURL URLByResolvingBookmarkData
to fail withError Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist."
The text was updated successfully, but these errors were encountered: