From 6551198a201a70cb11e25712b1d0b2a369bb8a4c Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 5 Nov 2007 14:50:57 -0800 Subject: [PATCH] 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 Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/afs/vlocation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 7b4bbe4..849fc31 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); } -- 2.7.4