summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-11-05 23:50:57 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-06 00:12:32 +0100
commit6551198a201a70cb11e25712b1d0b2a369bb8a4c (patch)
treeb4ca66da0b68b182df8761a058109a14ecefbcaa /fs
parentarm26: remove it again (diff)
downloadlinux-6551198a201a70cb11e25712b1d0b2a369bb8a4c.tar.xz
linux-6551198a201a70cb11e25712b1d0b2a369bb8a4c.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/vlocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index 7b4bbe48112d..849fc3160cb5 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -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);
}