make sure path doesn't overflow
This commit is contained in:
parent
12ef7f766b
commit
2ee8c440da
@ -331,7 +331,9 @@ int loadnro(menuEntry_s *me, int sock, struct in_addr remote) {
|
||||
|
||||
sanitisePath(filename);
|
||||
|
||||
sprintf(me->path, "%s%s%s", menuGetRootPath(), DIRECTORY_SEPARATOR, filename);
|
||||
snprintf(me->path, PATH_MAX, "%s%s%s", menuGetRootPath(), DIRECTORY_SEPARATOR, filename);
|
||||
// make sure it's terminated
|
||||
me->path[PATH_MAX] = 0;
|
||||
|
||||
argData_s* ad = &me->args;
|
||||
ad->dst = (char*)&ad->buf[1];
|
||||
|
Loading…
Reference in New Issue
Block a user