From: Jeff Trawick Date: Fri, 7 Nov 2003 13:40:04 +0000 (+0000) Subject: Fix uninitialized gprof directory name in prefork MPM. X-Git-Tag: pre_ajp_proxy~1062 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de5a239b61c8986908426021c61d8381f54775e7;p=thirdparty%2Fapache%2Fhttpd.git Fix uninitialized gprof directory name in prefork MPM. PR: 24450 Submitted by: Chris Knight Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101714 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index cff834bed4f..3e073e40271 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) Fix uninitialized gprof directory name in prefork MPM. PR 24450. + [Chris Knight ] + *) mod_auth_ldap: Fix some segfaults in the cache logic. PR 18756. [Matthieu Estrade ] diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index e1c01178d30..3867c0ee936 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -203,7 +203,10 @@ static void chdir_for_gprof(void) if(*(dir + len) == '%') { dir[len] = '\0'; apr_snprintf(buf, sizeof(buf), "%sgprof.%d", dir, (int)getpid()); - } + } + else { + buf[0] = '\0'; + } use_dir = ap_server_root_relative(pconf, buf[0] ? buf : dir); res = apr_dir_make(use_dir, APR_UREAD | APR_UWRITE | APR_UEXECUTE |