binmiscctl: Avoid segfault with "binmiscctl add" and no extra params
(cherry picked from commit c7fcb36f56
)
This commit is contained in:
parent
03bb5b837d
commit
78534b222b
@ -284,6 +284,8 @@ add_cmd(__unused int argc, char *argv[], ximgact_binmisc_entry_t *xbe)
|
||||
char *magic = NULL, *mask = NULL;
|
||||
int sz;
|
||||
|
||||
if (argc == 0)
|
||||
usage("Required argument missing\n");
|
||||
if (strlen(argv[0]) > IBE_NAME_MAX)
|
||||
usage("'%s' string length longer than IBE_NAME_MAX (%d)",
|
||||
IBE_NAME_MAX);
|
||||
|
Loading…
Reference in New Issue
Block a user