]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make sure that 'n' has a defined value
authorMartin Kraemer <martin@apache.org>
Wed, 29 May 2002 08:52:20 +0000 (08:52 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 29 May 2002 08:52:20 +0000 (08:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95344 13f79535-47bb-0310-9956-ffa450edef68

src/main/http_protocol.c

index 281427834f88a9cf58aa6835b896b4bac6cebad7..39cb8ad3936947ac82813109ebb0fed388d20e47 100644 (file)
@@ -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 */