diff --exclude-from=exclude --exclude=sepolgen-1.0.10 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semodule/semodule.c policycoreutils-2.0.29/semodule/semodule.c --- nsapolicycoreutils/semodule/semodule.c 2007-09-26 19:37:44.000000000 -0400 +++ policycoreutils-2.0.29/semodule/semodule.c 2007-10-11 15:59:39.000000000 -0400 @@ -249,11 +249,12 @@ * arguments as args. Will allow 'semodule -i *.pp' to * work as expected. */ - if (commands[num_commands - 1].mode == INSTALL_M) { + + if (commands && commands[num_commands - 1].mode == INSTALL_M) { mode = INSTALL_M; - } else if (commands[num_commands - 1].mode == UPGRADE_M) { + } else if (commands && commands[num_commands - 1].mode == UPGRADE_M) { mode = UPGRADE_M; - } else if (commands[num_commands - 1].mode == REMOVE_M) { + } else if (commands && commands[num_commands - 1].mode == REMOVE_M) { mode = REMOVE_M; } else { fprintf(stderr, "unknown additional arguments:\n");