cmd_argv[2] will be initialised only if it's specificed with -c. NULL deref otherwise resulting in crash. Signed-off-by: Brad Forschinger <bnjf@xxxxxxxxxx> --- sys-utils/flock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/flock.c b/sys-utils/flock.c index 84f1ec4..fda7bdc 100644 --- a/sys-utils/flock.c +++ b/sys-utils/flock.c @@ -319,7 +319,7 @@ int main(int argc, char *argv[]) /* Clear any inherited settings */ signal(SIGCHLD, SIG_DFL); if (verbose) - printf(_("%s: executing %s\n"), program_invocation_short_name, cmd_argv[2]); + printf(_("%s: executing %s\n"), program_invocation_short_name, cmd_argv[0]); f = fork(); if (f < 0) { -- 2.3.2 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html