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:
Nicolas Iooss 2019-09-01 20:06:28 +02:00 committed by James Carter
parent 4a266cc3ce
commit da8e3c7d36

View file

@ -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"))