mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
fix heap corruption in core info extension list
This commit is contained in:
parent
a624e617ed
commit
d8e38bedf0
@ -59,6 +59,8 @@ static void core_info_list_resolve_all_extensions(
|
||||
(strlen(core_info_list->list[i].supported_extensions) + 2);
|
||||
}
|
||||
|
||||
all_ext_len += strlen("7z|") + strlen("zip|");
|
||||
|
||||
if (all_ext_len)
|
||||
all_ext = (char*)calloc(1, all_ext_len);
|
||||
|
||||
@ -77,10 +79,10 @@ static void core_info_list_resolve_all_extensions(
|
||||
strlcat(core_info_list->all_ext, "|", all_ext_len);
|
||||
}
|
||||
#ifdef HAVE_7ZIP
|
||||
strlcat(core_info_list->all_ext, "7z|", all_ext_len + 3);
|
||||
strlcat(core_info_list->all_ext, "7z|", all_ext_len);
|
||||
#endif
|
||||
#ifdef HAVE_ZLIB
|
||||
strlcat(core_info_list->all_ext, "zip|", all_ext_len + 4);
|
||||
strlcat(core_info_list->all_ext, "zip|", all_ext_len);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user