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:
cac40d0
)
debugfs: fix crash in ea_set argument handling
author
Darrick J. Wong
<darrick.wong@oracle.com>
Tue, 27 Jan 2015 15:58:17 +0000
(10:58 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 27 Jan 2015 15:58:17 +0000
(10:58 -0500)
Fix an incorrect check in ea_set that would crash debugfs if someone
runs 'ea_set / foo.bar' (i.e. with no value argument)
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
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
a80fd0b
..
e71bc15
100644
(file)
--- a/
debugfs/xattrs.c
+++ b/
debugfs/xattrs.c
@@
-202,7
+202,7
@@
void do_set_xattr(int argc, char **argv)
}
}
- if (
optind != argc - 2 && optind != argc - 3
) {
+ if (
!(fp && optind == argc - 2) && !(!fp && optind == argc - 3)
) {
printf("%s: Usage: %s <file> <attr> [-f infile | value>]\n",
argv[0], argv[0]);
goto out2;