From: Andrey Volk Date: Mon, 5 Apr 2021 22:19:57 +0000 (+0300) Subject: [freeswitch] Argument with 'nonnull' attribute passed null in reincarnate_protect() X-Git-Tag: v1.10.7^2~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21952f26c1861c140d703d5e503d3732bd0e9e7f;p=thirdparty%2Ffreeswitch.git [freeswitch] Argument with 'nonnull' attribute passed null in reincarnate_protect() --- diff --git a/src/switch.c b/src/switch.c index abb66ef86f..d10994c4c2 100644 --- a/src/switch.c +++ b/src/switch.c @@ -390,13 +390,13 @@ static void reincarnate_protect(char **argv) { sigaction(SIGTERM, &sa15_prev, NULL); sigaction(SIGCHLD, &sa17_prev, NULL); if (argv) { - if (execv(argv[0], argv) == -1) { + if (argv[0] && execv(argv[0], argv) == -1) { char buf[256]; fprintf(stderr, "Reincarnate execv() failed: %d %s\n", errno, switch_strerror_r(errno, buf, sizeof(buf))); } fprintf(stderr, "Trying reincarnate-reexec plan B...\n"); - if (execvp(argv[0], argv) == -1) { + if (argv[0] && execvp(argv[0], argv) == -1) { char buf[256]; fprintf(stderr, "Reincarnate execvp() failed: %d %s\n", errno, switch_strerror_r(errno, buf, sizeof(buf)));