hfs: add sanity check for file name length
commitb8988229c7eed0ac7967fa212a2a3a5c832e7902
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Nov 2011 14:52:08 +0000 (14 17:52 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Nov 2011 22:35:22 +0000 (21 14:35 -0800)
treebec6a76ca5060dbe6bf2b29b25f9fb52886fdb43
parentd18c0efc9b76aad26000bb562037a9b675f1c0ae
hfs: add sanity check for file name length

commit bc5b8a9003132ae44559edd63a1623b7b99dfb68 upstream.

On a corrupted file system the ->len field could be wrong leading to
a buffer overflow.

Reported-and-acked-by: Clement LECIGNE <clement.lecigne@netasq.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/hfs/trans.c