Merge pull request #6835 from Dwedit/null-fix_

Fix a calloc(0) which led to uninitialized data being used later on.
This commit is contained in:
Twinaphex 2018-05-28 20:19:21 +02:00 committed by GitHub
commit cdc2bdb327
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -796,8 +796,9 @@ 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)
{