mirror of
https://github.com/apache/httpd.git
synced 2025-08-01 16:41:19 +00:00
* support/suexec.c (clean_env): Avoid use of sprintf; no functional change.
PR: 33207 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1846253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user