httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@Fujitsu-Siemens.com>
Subject Re: [PATCH] 1.3: Stricter check on request_line format
Date Mon, 13 May 2002 12:06:52 GMT
On Mon, May 13, 2002 at 01:58:38PM +0200, Kraemer, Martin wrote:
> @@ -1045,12 +1045,26 @@
>      r->assbackwards = (ll[0] == '\0');
>      r->protocol = ap_pstrdup(r->pool, ll[0] ? ll : "HTTP/0.9");
>  
> -    if (2 == sscanf(r->protocol, "HTTP/%u.%u", &major, &minor)
> +    if (3 == sscanf(r->protocol, "HTTP/%u.%u%n", &major, &minor, &n)

No, that should have been 
       if (2 == sscanf(r->protocol, "HTTP/%u.%u%n", &major, &minor, &n)
because %n does not increment the item count.

   Martin
-- 
<Martin.Kraemer@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Mime
View raw message