]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Don't allow bad value to be updated
authorJim Jagielski <jim@apache.org>
Tue, 29 Dec 2015 14:17:26 +0000 (14:17 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 29 Dec 2015 14:17:26 +0000 (14:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722137 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index a4664a451742c7e321c7d061daebca45f2daa1bd..41ebd4dc994cb9cbe16555b7ce64b21ad09fc9cc 100644 (file)
@@ -68,9 +68,10 @@ static const char *set_worker_param(apr_pool_t *p,
         /* 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