summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2004-08-11 16:25:30 +0200
committerJoe Orton <jorton@apache.org>2004-08-11 16:25:30 +0200
commitd2e2c4e584976c7c2e0911a3b37152aea2cd7c6c (patch)
treee3f496b275f51822c801cf40aa8734764fb4f189
parent* modules/ssl/ssl_engine_io.c (ssl_io_input_read): Fix potential (diff)
downloadapache2-d2e2c4e584976c7c2e0911a3b37152aea2cd7c6c.tar.xz
apache2-d2e2c4e584976c7c2e0911a3b37152aea2cd7c6c.zip
* modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify_CRL),
* server/log.c (ap_log_pid), * server/mpm/prefork/prefork.c (accept_mutex_on, accept_mutex_off), * support/htdbm.c (htdbm_list): Fix some non-literal format strings (warnings from gcc -Wformat-security). PR: 30585 Submitted by: Ulf Harnhammar (SITIC), Joe Orton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104548 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/ssl/ssl_engine_kernel.c2
-rw-r--r--server/log.c6
-rw-r--r--server/mpm/prefork/prefork.c8
-rw-r--r--support/htdbm.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
index 6022ef9262..a71d829e66 100644
--- a/modules/ssl/ssl_engine_kernel.c
+++ b/modules/ssl/ssl_engine_kernel.c
@@ -1401,7 +1401,7 @@ int ssl_callback_SSLVerify_CRL(int ok, X509_STORE_CTX *ctx, conn_rec *c)
BIO_free(bio);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, buff);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "%s", buff);
}
/*
diff --git a/server/log.c b/server/log.c
index f8c2af4204..16574ab22e 100644
--- a/server/log.c
+++ b/server/log.c
@@ -625,9 +625,9 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
* based on the last modification time of the pid file.
*/
ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, p,
- apr_psprintf(p, "pid file %s overwritten -- Unclean "
- "shutdown of previous Apache run?",
- fname));
+ "pid file %s overwritten -- Unclean "
+ "shutdown of previous Apache run?",
+ fname);
}
if ((rv = apr_file_open(&pid_file, fname,
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 3dbbe58fff..7acd04b976 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -210,11 +210,11 @@ static void accept_mutex_on(void)
if (ap_my_generation !=
ap_scoreboard_image->global->running_generation) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, NULL, msg);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, NULL, "%s", msg);
clean_child_exit(0);
}
else {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, msg);
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "%s", msg);
exit(APEXIT_CHILDFATAL);
}
}
@@ -228,14 +228,14 @@ static void accept_mutex_off(void)
if (ap_my_generation !=
ap_scoreboard_image->global->running_generation) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, NULL, msg);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, NULL, "%s", msg);
/* don't exit here... we have a connection to
* process, after which point we'll see that the
* generation changed and we'll exit cleanly
*/
}
else {
- ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, msg);
+ ap_log_error(APLOG_MARK, APLOG_EMERG, rv, NULL, "%s", msg);
exit(APEXIT_CHILDFATAL);
}
}
diff --git a/support/htdbm.c b/support/htdbm.c
index 652d5d793f..cdb317e3f7 100644
--- a/support/htdbm.c
+++ b/support/htdbm.c
@@ -263,7 +263,7 @@ static apr_status_t htdbm_list(htdbm_t *htdbm)
rec[val.dsize] = '\0';
cmnt = strchr(rec, ':');
if (cmnt)
- fprintf(stderr, cmnt + 1);
+ fprintf(stderr, "%s", cmnt + 1);
fprintf(stderr, "\n");
rv = apr_dbm_nextkey(htdbm->dbm, &key);
if (rv != APR_SUCCESS)