mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Fix a calloc(0) which led to uninitialized data being used later on.
This commit is contained in:
parent
6ef5232f32
commit
8cd8e7d3ae
1 changed files with 5 additions and 2 deletions
|
@ -796,8 +796,11 @@ static bool content_file_init(
|
|||
!content_file_init_set_attribs(content, special, content_ctx, error_string))
|
||||
return false;
|
||||
|
||||
info = (struct retro_game_info*)
|
||||
calloc(content->size, sizeof(*info));
|
||||
if (content->size > 0)
|
||||
{
|
||||
info = (struct retro_game_info*)
|
||||
calloc(content->size, sizeof(*info));
|
||||
}
|
||||
|
||||
if (info)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue