mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
read_generic_file - add early return if rom_buf is NULL
This commit is contained in:
parent
0ea6dc0445
commit
932fc3d353
@ -121,6 +121,9 @@ static bool read_generic_file(const char *path, void **buf, ssize_t *len)
|
||||
if ((ret = fread(rom_buf, 1, _len, file)) < _len)
|
||||
RARCH_WARN("Didn't read whole file.\n");
|
||||
|
||||
if (!rom_buf)
|
||||
goto error;
|
||||
|
||||
*buf = rom_buf;
|
||||
|
||||
/* Allow for easy reading of strings to be safe.
|
||||
|
Loading…
x
Reference in New Issue
Block a user