]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
hfs: fix namelength memory corruption
authorEric Sesterhenn <snakebyte@gmx.de>
Thu, 16 Oct 2008 05:04:11 +0000 (22:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Oct 2008 18:21:46 +0000 (11:21 -0700)
commitd38b7aa7fc3371b52d036748028db50b585ade2e
treefd4193112378362a5c12999d467bdaaf8875d1b0
parent649f1ee6c705aab644035a7998d7b574193a598a
hfs: fix namelength memory corruption

Fix a stack corruption caused by a corrupted hfs filesystem.  If the
catalog name length is corrupted the memcpy overwrites the catalog btree
structure.  Since the field is limited to HFS_NAMELEN bytes in the
structure and the file format, we throw an error if it is too long.

Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hfs/catalog.c