[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: svn commit: r1697735 - /httpd/httpd/trunk/modules/mappers/mod_rewrite.c
From:       Christophe JAILLET <christophe.jaillet () wanadoo ! fr>
Date:       2015-08-25 17:01:41
Message-ID: 55DC9F75.8000305 () wanadoo ! fr
[Download RAW message or body]

Hi,


A better solution could be to add some () around all the x<<1 in the 
CONDFLAG_,  RULEFLAG_, ...
This would be more invasive but would prevent potential similar future 
issues.

I proposed the more simple solution below.

CJ


Le 25/08/2015 18:57, jailletc36@apache.org a écrit :
> Author: jailletc36
> Date: Tue Aug 25 16:57:13 2015
> New Revision: 1697735
> 
> URL: http://svn.apache.org/r1697735
> Log:
> Fix an error spotted by sparse.
> Without the parens, the 2 first bits are reseted, instead of just the one for \
> CONDFLAG_NOCASE. 
> This "bug" looks harmless as the first bit (CONDFLAG_NONE) is never tested.
> 
> Modified:
> httpd/httpd/trunk/modules/mappers/mod_rewrite.c
> 
> Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1697735&r1=1697734&r2=1697735&view=diff
>  ==============================================================================
> --- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
> +++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Tue Aug 25 16:57:13 2015
> @@ -3439,7 +3439,7 @@ static const char *cmd_rewritecond(cmd_p
> "RewriteCond: NoCase option for non-regex pattern '%s' "
> "is not supported and will be ignored. (%s:%d)", a2,
> cmd->directive->filename, cmd->directive->line_num);
> -        newcond->flags &= ~CONDFLAG_NOCASE;
> +        newcond->flags &= ~(CONDFLAG_NOCASE);
> }
> 
> newcond->pskip = a2 - newcond->pattern;
> 
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic