httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1738875 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c
Date Tue, 12 Apr 2016 22:43:00 GMT
Author: ylavic
Date: Tue Apr 12 22:43:00 2016
New Revision: 1738875

URL: http://svn.apache.org/viewvc?rev=1738875&view=rev
Log:
mod_proxy: really return an error message on invalid "flusher" value.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1738875&r1=1738874&r2=1738875&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Tue Apr 12 22:43:00 2016
@@ -303,10 +303,10 @@ static const char *set_worker_param(apr_
         worker->s->conn_timeout_set = 1;
     }
     else if (!strcasecmp(key, "flusher")) {
-        if (strlen(val) >= sizeof(worker->s->flusher))
-            apr_psprintf(p, "flusher name length must be < %d characters",
-                    (int)sizeof(worker->s->flusher));
-        PROXY_STRNCPY(worker->s->flusher, val);
+        if (PROXY_STRNCPY(worker->s->flusher, val) != APR_SUCCESS) {
+            return apr_psprintf(p, "flusher name length must be < %d characters",
+                                (int)sizeof(worker->s->flusher));
+        }
     }
     else {
         if (set_worker_hc_param_f) {



Mime
View raw message