From 2a83cd42365120787cdb41693ed1bb3eb9c4ff90 Mon Sep 17 00:00:00 2001 From: Aaron Bannert Date: Wed, 29 May 2002 14:57:26 +0000 Subject: [PATCH] Ignore leading zeros when parsing hex value for chunk extensions. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95352 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_protocol.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 0871a1c69b..d7c5816ae2 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1692,6 +1692,11 @@ static long get_chunk_size(char *b) long chunksize = 0; size_t chunkbits = sizeof(long) * 8; + /* Skip leading zeros */ + while (*b == '0') { + ++b; + } + while (apr_isxdigit(*b) && (chunkbits > 0)) { int xvalue = 0; -- 2.40.0