httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul J. Reder" <rede...@remulak.net>
Subject Re: cvs commit: httpd-2.0/modules/filters mod_include.c
Date Fri, 29 Mar 2002 14:16:19 GMT
This is *not* equivalent code. In the deleted line the increment happens
*after* the check. In the replacement line of code the increment happens
during the check. This patch is wrong and should be backed out.

Paul J. Reder

bnicholes@apache.org wrote:

> bnicholes    02/03/28 16:39:56
> 
>   Modified:    modules/filters mod_include.c
>   Log:
>   Stop the while loop from incrementing twice per iteration before checking for
>   the NULL terminator.  This was causing the while loop to walk off the end of any
>   string with an odd number of characters.
>   
>   Revision  Changes    Path
>   1.209     +1 -1      httpd-2.0/modules/filters/mod_include.c
>   
>   Index: mod_include.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
>   retrieving revision 1.208
>   retrieving revision 1.209
>   diff -u -r1.208 -r1.209
>   --- mod_include.c	28 Mar 2002 01:57:03 -0000	1.208
>   +++ mod_include.c	29 Mar 2002 00:39:56 -0000	1.209
>   @@ -1179,7 +1179,7 @@
>                return 0;
>    #endif
>            path += dots;
>   -        while (*path && *(path++) != '/')
>   +        while (*path && *(path+1) != '/')
>                ++path;
>        }
>        return 1;
>   
>   
>   
> 
> 
> 


-- 
Paul J. Reder
-----------------------------------------------------------
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein



Mime
View raw message