X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprocess.c;h=a3de06591c86b40ccf28b7c3bb1102adee70c258;hp=f2fff1dc6d0446c0ab36c66921b74e26995dcc99;hb=257cb6ac60bb0924720de9e252cdf7f4759bf741;hpb=f5122ccecee095b9185b2324dea7bcd9655462ee diff --git a/src/process.c b/src/process.c index f2fff1dc..a3de0659 100644 --- a/src/process.c +++ b/src/process.c @@ -356,7 +356,7 @@ bool detach(void) { bool execute_script(const char *name, char **envp) { #ifdef HAVE_SYSTEM int status, len; - char *scriptname, *p; + char *scriptname; int i; #ifndef HAVE_MINGW @@ -397,7 +397,7 @@ bool execute_script(const char *name, char **envp) { for(i = 0; envp[i]; i++) { char *e = strchr(envp[i], '='); if(e) { - p = alloca(e - envp[i] + 1); + char p[e - envp[i] + 1]; strncpy(p, envp[i], e - envp[i]); p[e - envp[i]] = '\0'; putenv(p); @@ -546,6 +546,7 @@ static struct { {SIGCHLD, ignore_signal_handler}, {SIGALRM, sigalrm_handler}, {SIGWINCH, sigwinch_handler}, + {SIGABRT, SIG_DFL}, {0, NULL} }; #endif