OSDN Git Service
(root)
/
android-x86
/
external-e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beec19f
)
dumpe2fs: don't crash when the user provides no block device argument
author
Darrick J. Wong
<darrick.wong@oracle.com>
Sat, 8 Nov 2014 02:26:14 +0000
(21:26 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 8 Nov 2014 02:26:14 +0000
(21:26 -0500)
If the user doesn't provide any arguments, the guard fails to run and
the whole thing segfaults on ext2fs_open2(). Don't do that.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/dumpe2fs.c
patch
|
blob
|
history
diff --git
a/misc/dumpe2fs.c
b/misc/dumpe2fs.c
index
1eae5a3
..
4185d6e
100644
(file)
--- a/
misc/dumpe2fs.c
+++ b/
misc/dumpe2fs.c
@@
-575,7
+575,7
@@
int main (int argc, char ** argv)
usage();
}
}
- if (
argc - 1 > optind
) {
+ if (
optind != argc - 1
) {
usage();
exit(1);
}