Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a64e93
)
debugfs: fix printing of xattrs with ea_in_inode values
author
Theodore Ts'o
<tytso@mit.edu>
Tue, 26 Mar 2019 13:36:53 +0000
(09:36 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 26 Mar 2019 13:36:53 +0000
(09:36 -0400)
Due to a missing "else" debugfs was printing (garbage) from the xattr
buffer which could potentially overrun the end of the buffer.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/xattrs.c
patch
|
blob
|
history
diff --git
a/debugfs/xattrs.c
b/debugfs/xattrs.c
index
8bbaaed
..
bd11450
100644
(file)
--- a/
debugfs/xattrs.c
+++ b/
debugfs/xattrs.c
@@
-452,7
+452,7
@@
static void dump_xattr_raw_entries(FILE *f, unsigned char *buf,
else if (ent.e_value_offs >= len ||
(vstart + ent.e_value_size) > len)
fprintf(f, "<runs off end>");
- if (is_mostly_printable((char *)(buf + vstart),
+
else
if (is_mostly_printable((char *)(buf + vstart),
ent.e_value_size))
safe_print(f, (char *)(buf + vstart),
ent.e_value_size);