forked from len0rd/rockbox
Corrected name buffer limit check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5605 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f59a223266
commit
f44a519119
1 changed files with 1 additions and 2 deletions
|
@ -286,8 +286,7 @@ int db_load(struct tree_context* c)
|
|||
|
||||
/* next name is stored immediately after this */
|
||||
nptr = (void*)nptr + strlen((char*)nptr) + 1;
|
||||
if ((void*)nptr > (void*)end_of_nbuf) {
|
||||
DEBUGF("Name buffer overflow (%d)\n",i);
|
||||
if ((void*)nptr + stringlen > (void*)end_of_nbuf) {
|
||||
c->dirfull = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue