]> git.baikalelectronics.ru Git - kernel.git/commit
autofs4: fix string validation check order
authorIan Kent <raven@themaw.net>
Tue, 6 Jan 2009 22:42:09 +0000 (14:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:23 +0000 (15:59 -0800)
commit5721c1841a2cbc9141c0dd8c863ca68877becb5e
tree89dffc974d4b6bb899d0419527a574a143c9bf6d
parentd1db424c1e2a136c69d514221d448e1d1c2f6821
autofs4: fix string validation check order

In function validate_dev_ioctl() we check that the string we've been sent
is a valid path.  The function that does this check assumes the string is
NULL terminated but our NULL termination check isn't done until after this
call.  This patch changes the order of the check.

Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/dev-ioctl.c