Fix possible overflow when using /menu
This commit is contained in:
parent
d6e3f740bc
commit
f614a3c311
@ -1168,7 +1168,9 @@ menu_is_mainmenu_root (char *path, gint16 *offset)
|
||||
{
|
||||
if (!strncmp (path, menus[i] + 1, menus[i][0]))
|
||||
{
|
||||
*offset = menus[i][0] + 1; /* number of bytes to offset the root */
|
||||
*offset = menus[i][0]; /* number of bytes to offset the root */
|
||||
if (path[*offset] != '\0')
|
||||
*offset += 1;
|
||||
return 0; /* is not main menu */
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user