dect
/
linux-2.6
Archived
13
0
Fork 0

fs/afs/vlocation.c: fix off-by-one

This patch fixes an off-by-one error spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Adrian Bunk 2007-11-05 14:50:57 -08:00 committed by Linus Torvalds
parent f11b7ae8d6
commit 6551198a20
1 changed files with 1 additions and 1 deletions

View File

@ -382,7 +382,7 @@ struct afs_vlocation *afs_vlocation_lookup(struct afs_cell *cell,
cell->name, key_serial(key),
(int) namesz, (int) namesz, name, namesz);
if (namesz > sizeof(vl->vldb.name)) {
if (namesz >= sizeof(vl->vldb.name)) {
_leave(" = -ENAMETOOLONG");
return ERR_PTR(-ENAMETOOLONG);
}