mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Prevent nULL pointer dereference
This commit is contained in:
parent
779a7676d6
commit
e8c1c153d6
@ -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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user