projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
605e806
)
Btrfs-progs: fix arguments check of qgroup limit
author
Tsutomu Itoh
<t-itoh@jp.fujitsu.com>
Wed, 12 Sep 2012 04:30:19 +0000
(13:30 +0900)
committer
David Sterba
<dsterba@suse.cz>
Tue, 2 Oct 2012 11:02:51 +0000
(13:02 +0200)
Segmentation fault occurred in the following command.
# btrfs qgroup limit
Segmentation fault
So, we should check a minimum number of arguments.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
cmds-qgroup.c
patch
|
blob
|
history
diff --git
a/cmds-qgroup.c
b/cmds-qgroup.c
index
15534ea
..
1525c11
100644
(file)
--- a/
cmds-qgroup.c
+++ b/
cmds-qgroup.c
@@
-374,6
+374,9
@@
static int cmd_qgroup_limit(int argc, char **argv)
}
}
+ if (check_argc_min(argc - optind, 2))
+ usage(cmd_qgroup_limit_usage);
+
if (!parse_limit(argv[optind], &size)) {
fprintf(stderr, "Invalid size argument given\n");
return 1;