]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_engine_kernel.c (ssl_callback_SSLVerify_CRL),
authorJoe Orton <jorton@apache.org>
Wed, 11 Aug 2004 14:25:30 +0000 (14:25 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 11 Aug 2004 14:25:30 +0000 (14:25 +0000)
* 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

modules/ssl/ssl_engine_kernel.c
server/log.c
server/mpm/prefork/prefork.c
support/htdbm.c

index 6022ef92626ee830b01ba15ebcd5af60ea826e18..a71d829e663f28c868ada959821ca7b7d8bf2989 100644 (file)
@@ -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);
         }
 
         /*
index f8c2af4204a9a582e3b0a0b683b4c509a7202566..16574ab22ef15c589cb463722747fe742eff8101 100644 (file)
@@ -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,
index 3dbbe58fffb6c79bc2c4d1d69d17cb1c02623ac6..7acd04b976f1d7f3a15dbbe44c18ffbe8a1c86da 100644 (file)
@@ -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);
         }
     }
index 652d5d793febd26363d899e15cd427be62e24794..cdb317e3f729415bba90f129654cb0fb6bd06df6 100644 (file)
@@ -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)