mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
Fix missing NUL terminator.
This commit is contained in:
parent
3c7e0b29fc
commit
964c2439ff
@ -729,6 +729,7 @@ enum retro_mod
|
||||
* location-based information from the host device,
|
||||
* such as current latitude / longitude.
|
||||
*/
|
||||
#define RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY 30 /* Old name, kept for compatibility. */
|
||||
#define RETRO_ENVIRONMENT_GET_CORE_ASSETS_DIRECTORY 30
|
||||
/* const char ** --
|
||||
* Returns the "core assets" directory of the frontend.
|
||||
|
@ -227,12 +227,13 @@ int cb_core_updater_list(void *data_, size_t len)
|
||||
if (core_buf)
|
||||
free(core_buf);
|
||||
|
||||
core_buf = (char*)malloc(len * sizeof(char));
|
||||
core_buf = (char*)malloc((len+1) * sizeof(char));
|
||||
|
||||
if (!core_buf)
|
||||
return -1;
|
||||
|
||||
memcpy(core_buf, data, len * sizeof(char));
|
||||
core_buf[len] = '\0';
|
||||
core_len = len;
|
||||
|
||||
menu->nonblocking_refresh = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user