From f0d1a733e33654f72cb788a8542f378048716639 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 11 Oct 2016 02:07:21 -0400 Subject: [PATCH] fix 7z extraction endless loop --- libretro-common/file/archive_file_7z.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libretro-common/file/archive_file_7z.c b/libretro-common/file/archive_file_7z.c index e864bae715..992b2cbffd 100644 --- a/libretro-common/file/archive_file_7z.c +++ b/libretro-common/file/archive_file_7z.c @@ -390,14 +390,17 @@ static int sevenzip_parse_file_iterate_step(file_archive_transfer_t *state, unsigned cmode = 0; unsigned payload = 0; struct sevenzip_context_t *sevenzip_context = NULL; - int ret = sevenzip_parse_file_iterate_step_internal(state, filename, + int ret; + + filename[0] = '\0'; + + ret = sevenzip_parse_file_iterate_step_internal(state, filename, &cdata, &cmode, &size, &csize, &checksum, &payload, userdata); if (ret != 1) return ret; - filename[0] = '\0'; userdata->extracted_file_path = filename; userdata->crc = checksum;