httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/server core.c
Date Mon, 24 May 2004 22:55:08 GMT
nd          2004/05/24 15:55:08

  Modified:    server   core.c
  Log:
  use new apr_strtoff function to parse limitrequestbody
  
  Revision  Changes    Path
  1.278     +4 -6      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -u -r1.277 -r1.278
  --- core.c	17 May 2004 15:24:31 -0000	1.277
  +++ core.c	24 May 2004 22:55:08 -0000	1.278
  @@ -2598,12 +2598,10 @@
           return err;
       }
   
  -    /* WTF: If strtoul is not portable, then write a replacement.
  -     *      Instead we have an idiotic define in httpd.h that prevents
  -     *      it from being used even when it is available. Sheesh.
  -     */
  -    conf->limit_req_body = (apr_off_t)strtol(arg, &errp, 10);
  -    if (*errp != '\0') {
  +    if (APR_SUCCESS != apr_strtoff(&conf->limit_req_body, arg, &errp, 10)) {
  +        return "LimitRequestBody argument is not parsable.";
  +    }
  +    if (*errp || conf->limit_req_body < 0) {
           return "LimitRequestBody requires a non-negative integer.";
       }
   
  
  
  

Mime
View raw message