semodule-utils: fix comparison with argc
In order for argv[3] to be used, argc needs to be at least 4, not 3.
This bug was found using lgtm.com analyzer:
8c1b2658f8/files/semodule-utils/semodule_package/semodule_unpackage.c (xb1ce80b43260d34c)
:1
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
4a266cc3ce
commit
da8e3c7d36
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ int main(int argc, char **argv)
|
|||
|
||||
ppfile = argv[1];
|
||||
modfile = argv[2];
|
||||
if (argc >= 3)
|
||||
if (argc >= 4)
|
||||
fcfile = argv[3];
|
||||
|
||||
if (file_to_policy_file(ppfile, &in, "r"))
|
||||
|
|
Loading…
Reference in a new issue