Whamcloud - gitweb
debugfs: fix sprintf stack overflow
authorDarrick J. Wong <djwong@us.ibm.com>
Sun, 20 Nov 2011 20:47:02 +0000 (15:47 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 20 Nov 2011 20:53:11 +0000 (15:53 -0500)
commit9c23b8961205f30d29c4137f4833f78cc48ce3fb
treecba7a50ea3c2685e9cbc3389cb708c3dade56368
parent08ae93a2eda03817deabf08d4da9015a283ed56b
debugfs: fix sprintf stack overflow

The htree dump code overflows a char buffer if the directory has a long
filename because the buffer is not large enough to hold the characters that are
not part of the filename.  Make the buffer larger and use snprintf instead.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/htree.c