From: Adrian Bunk Date: Mon, 5 Nov 2007 22:50:57 +0000 (-0800) Subject: fs/afs/vlocation.c: fix off-by-one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6551198a201a70cb11e25712b1d0b2a369bb8a4c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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); }