summaryrefslogtreecommitdiff
path: root/fs/afs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-11-05 14:50:57 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-05 15:12:32 -0800
commit6551198a201a70cb11e25712b1d0b2a369bb8a4c (patch)
treeb4ca66da0b68b182df8761a058109a14ecefbcaa /fs/afs
parentf11b7ae8d6180bb3c0ad04b38a8ca7e0a26c6605 (diff)
downloadlwn-6551198a201a70cb11e25712b1d0b2a369bb8a4c.tar.gz
lwn-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/afs')
-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);
}