From: Martin Kraemer Date: Wed, 29 May 2002 08:52:20 +0000 (+0000) Subject: Make sure that 'n' has a defined value X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=279c979eff6ba59dd21aadc1124c5615c66d9a4c;p=thirdparty%2Fapache%2Fhttpd.git Make sure that 'n' has a defined value git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95344 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/http_protocol.c b/src/main/http_protocol.c index 281427834f8..39cb8ad3936 100644 --- a/src/main/http_protocol.c +++ b/src/main/http_protocol.c @@ -1048,8 +1048,10 @@ static int read_request_line(request_rec *r) if (2 == sscanf(r->protocol, "HTTP/%u.%u%n", &major, &minor, &n) && minor < HTTP_VERSION(1,0)) /* don't allow HTTP/0.1000 */ r->proto_num = HTTP_VERSION(major, minor); - else + else { r->proto_num = HTTP_VERSION(1,0); + n = 0; + } /* Check for a valid protocol, and disallow everything but whitespace * after the protocol string */