Fix Segmentation fault in io_zip for IPA files (#9262)

This commit is contained in:
Marc 2018-01-29 23:46:26 +01:00 committed by radare
parent d6047b24ff
commit 9d359653dd

View File

@ -391,7 +391,7 @@ static RIODesc *r_io_zip_open(RIO *io, const char *file, int rw, int mode) {
const char *slash = r_str_rchr (name, bin_name, '/');
if (slash) {
bin_name = r_str_ndup (slash + 1, (bin_name - slash) -1);
char *chkstr = r_str_newf ("Payload/%s.app/%s", bin_name);
char *chkstr = r_str_newf ("Payload/%s.app/%s", bin_name, bin_name);
if (!strcmp (name, chkstr)) {
zip_filename = r_str_newf ("//%s", chkstr);
free (chkstr);