You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/01/28 06:38:04 UTC
[PATCH] mod_rewrite.c (aka I'm a moron)
Damn that error is _HARD_ to find. I narrowed it down to that exact line
with a pseudo-binary search through my changes and it _still_ took me
several minutes of starting at it.
I don't suppose anyone will object to me fixing this one?
Should we perhaps maintain a patches against 1.2b6 dir and put all the
stuff in there? Gives us those couple more testers before release...
Index: mod_rewrite.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
retrieving revision 1.15
diff -c -r1.15 mod_rewrite.c
*** mod_rewrite.c 1997/01/20 04:28:15 1.15
--- mod_rewrite.c 1997/01/28 05:33:58
***************
*** 1544,1550 ****
/* substitute in output */
#ifdef HAS_APACHE_REGEX_LIB
strncpy(newuri, pregsub(r->pool, output, uri, regexp->re_nsub+1, regmatch), sizeof(newuri)-1); /* substitute in output */
! newuri[sizeof(newuri-1)] = '\0';
#else
regsub(regexp, output, newuri); /* substitute in output */
#endif
--- 1544,1550 ----
/* substitute in output */
#ifdef HAS_APACHE_REGEX_LIB
strncpy(newuri, pregsub(r->pool, output, uri, regexp->re_nsub+1, regmatch), sizeof(newuri)-1); /* substitute in output */
! newuri[sizeof(newuri)-1] = '\0';
#else
regsub(regexp, output, newuri); /* substitute in output */
#endif
Re: [PATCH] mod_rewrite.c (aka I'm a moron)
Posted by Dean Gaudet <dg...@arctic.org>.
On Mon, 27 Jan 1997, Marc Slemko wrote:
> ! newuri[sizeof(newuri-1)] = '\0';
Oh wow, I wonder if the gcc folk would be able to add a -Wall for this. I
can imagine a few heuristics for the grammar.
Dean