From 6b9b5a718a9a00069d6a9a07c5990b470ca1b707 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Malo?= Date: Mon, 24 May 2004 22:55:08 +0000 Subject: [PATCH] use new apr_strtoff function to parse limitrequestbody git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103750 13f79535-47bb-0310-9956-ffa450edef68 --- server/core.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/server/core.c b/server/core.c index 347d8bd787..bbdd0eb137 100644 --- a/server/core.c +++ b/server/core.c @@ -2598,12 +2598,10 @@ static const char *set_limit_req_body(cmd_parms *cmd, void *conf_, 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."; } -- 2.50.1