httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1846253 - /httpd/httpd/trunk/support/suexec.c
Date Fri, 09 Nov 2018 16:02:21 GMT
Author: jorton
Date: Fri Nov  9 16:02:21 2018
New Revision: 1846253

URL: http://svn.apache.org/viewvc?rev=1846253&view=rev
Log:
* support/suexec.c (clean_env): Avoid use of sprintf; no functional change.

PR: 33207

Modified:
    httpd/httpd/trunk/support/suexec.c

Modified: httpd/httpd/trunk/support/suexec.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/suexec.c?rev=1846253&r1=1846252&r2=1846253&view=diff
==============================================================================
--- httpd/httpd/trunk/support/suexec.c (original)
+++ httpd/httpd/trunk/support/suexec.c Fri Nov  9 16:02:21 2018
@@ -223,7 +223,6 @@ static void log_no_err(const char *fmt,.
 
 static void clean_env(void)
 {
-    char pathbuf[512];
     char **cleanenv;
     char **ep;
     int cidx = 0;
@@ -245,8 +244,7 @@ static void clean_env(void)
         exit(123);
     }
 
-    sprintf(pathbuf, "PATH=%s", AP_SAFE_PATH);
-    cleanenv[cidx] = strdup(pathbuf);
+    cleanenv[cidx] = strdup("PATH=" AP_SAFE_PATH);
     if (cleanenv[cidx] == NULL) {
         log_err("failed to malloc memory for environment\n");
         exit(124);



Mime
View raw message