Commit 17fc776b authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

Fix potential buffer overflow

parent e118c7fc
......@@ -616,9 +616,10 @@ bool retro_load_game(const struct retro_game_info *info)
struct retro_keyboard_callback cb = { keyboard_cb };
const char *full_path = info->path;
memset(RPATH, 0, sizeof(info->path));
if (info && info->path)
strncpy(RPATH, info->path, sizeof(RPATH) - 1);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment