mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Prevent 'undefined allocation of 0 bytes'
This commit is contained in:
parent
7fdc38bf30
commit
3e066165e5
@ -175,6 +175,9 @@ core_option_manager_t *core_option_manager_new(const char *conf_path,
|
||||
for (var = vars; var->key && var->value; var++)
|
||||
size++;
|
||||
|
||||
if (size == 0)
|
||||
goto error;
|
||||
|
||||
opt->opts = (struct core_option*)calloc(size, sizeof(*opt->opts));
|
||||
if (!opt->opts)
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user