mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
fix heap buffer overflow
This commit is contained in:
parent
73f271021a
commit
5fd0664277
@ -193,9 +193,12 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(const char *path, uns
|
||||
|
||||
#ifdef VFS_FRONTEND
|
||||
const char *dumb_prefix = "vfsonly://";
|
||||
int dumb_prefix_len = strlen(dumb_prefix);
|
||||
int path_len = strlen(path);
|
||||
|
||||
if (!memcmp(path, dumb_prefix, strlen(dumb_prefix)))
|
||||
path += strlen(dumb_prefix);
|
||||
if (path_len >= dumb_prefix_len)
|
||||
if (!memcmp(path, dumb_prefix, dumb_prefix_len))
|
||||
path += strlen(dumb_prefix);
|
||||
#endif
|
||||
|
||||
if (!stream)
|
||||
|
Loading…
x
Reference in New Issue
Block a user