summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2005-01-19 12:19:58 +0000
committerBjörn Stenberg <bjorn@haxx.se>2005-01-19 12:19:58 +0000
commitf44a519119df2a48e9edf562c7736a4c2fee9e63 (patch)
tree6e70a8757997f0bc5f045a83acdc8f9a98228faa
parentf59a223266399577a70b60fd6816a2d479b1993a (diff)
downloadrockbox-f44a519119df2a48e9edf562c7736a4c2fee9e63.tar.gz
rockbox-f44a519119df2a48e9edf562c7736a4c2fee9e63.tar.bz2
rockbox-f44a519119df2a48e9edf562c7736a4c2fee9e63.zip
Corrected name buffer limit check
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5605 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/dbtree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/dbtree.c b/apps/dbtree.c
index abe8aed647..6f78e02ca2 100644
--- a/apps/dbtree.c
+++ b/apps/dbtree.c
@@ -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;
}