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, [email protected] 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;