mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
Btrfs-progs: fix arguments check of qgroup limit
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>
This commit is contained in:
parent
605e806166
commit
d88f33152f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user