Unrar4iOS
Unrar4iOS copied to clipboard
EXC_BAD_ACCESS on listing contents of corrupted file
I get an EXC_BAD_ACCESS error when calling -[Unrar4iOS unrarListFiles]. The stack trace shows:
0 File::Tell()
1 Archive::ReadHeader()
2 Archive::SearchBlock(int)
3 RARReadHeaderEx
4 -[Unrar4iOS unrarListFiles]
It would be great if it could return an NSError* object on such an error condition, the way most file I/O APIs do, or perhaps add a method you can call separately to check the validity of the file.
This behavior happens if you call it for any file that's not a RAR archive (though for me it originally happened with a file that was supposed to be a RAR), so it's easily reproducible.