mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +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
|
#ifdef VFS_FRONTEND
|
||||||
const char *dumb_prefix = "vfsonly://";
|
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)))
|
if (path_len >= dumb_prefix_len)
|
||||||
path += strlen(dumb_prefix);
|
if (!memcmp(path, dumb_prefix, dumb_prefix_len))
|
||||||
|
path += strlen(dumb_prefix);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!stream)
|
if (!stream)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user