From: Aaron Bannert Date: Wed, 29 May 2002 14:57:26 +0000 (+0000) Subject: Ignore leading zeros when parsing hex value for chunk extensions. X-Git-Tag: 2.0.37~206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a83cd42365120787cdb41693ed1bb3eb9c4ff90;p=apache 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 --- 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;