You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2015/12/29 15:17:26 UTC

svn commit: r1722137 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c

Author: jim
Date: Tue Dec 29 14:17:26 2015
New Revision: 1722137

URL: http://svn.apache.org/viewvc?rev=1722137&view=rev
Log:
Don't allow bad value to be updated

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=1722137&r1=1722136&r2=1722137&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Tue Dec 29 14:17:26 2015
@@ -68,9 +68,10 @@ static const char *set_worker_param(apr_
         /* Normalized load factor. Used with BalancerMember,
          * it is a number between 1 and 100.
          */
-        worker->s->lbfactor = atoi(val);
-        if (worker->s->lbfactor < 1 || worker->s->lbfactor > 100)
+        ival = atoi(val);
+        if (ival < 1 || ival > 100)
             return "LoadFactor must be a number between 1..100";
+        worker->s->lbfactor = ival;
     }
     else if (!ap_casecmpstr(key, "retry")) {
         /* If set it will give the retry timeout for the worker