Prevent nULL pointer dereference

This commit is contained in:
twinaphex 2017-05-08 22:55:45 +02:00
parent 779a7676d6
commit e8c1c153d6

View File

@ -522,12 +522,6 @@ bool file_archive_extract_file(
bool ret = true;
struct string_list *list = string_split(valid_exts, "|");
if (!list)
{
ret = false;
goto end;
}
userdata.archive_path[0] = '\0';
userdata.first_extracted_file_path = NULL;
userdata.extracted_file_path = NULL;
@ -547,6 +541,12 @@ bool file_archive_extract_file(
userdata.decomp_state.size = 0;
userdata.decomp_state.found = NULL;
if (!list)
{
ret = false;
goto end;
}
if (!file_archive_walk(archive_path, valid_exts,
file_archive_extract_cb, &userdata))
{