httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Sun, 23 Feb 2003 22:04:23 GMT
nd          2003/02/23 14:04:23

  Modified:    modules/mappers mod_rewrite.c
  Log:
  guess, what happens, when l == 0
  theoretical case, maybe ...
  
  Revision  Changes    Path
  1.141     +2 -2      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- mod_rewrite.c	23 Feb 2003 00:05:32 -0000	1.140
  +++ mod_rewrite.c	23 Feb 2003 22:04:23 -0000	1.141
  @@ -4013,7 +4013,7 @@
   
       /* first create a match string which always has a trailing slash */
       l = apr_cpystrn(matchbuf, match, sizeof(matchbuf) - 1) - matchbuf;
  -    if (matchbuf[l-1] != '/') {
  +    if (!l || matchbuf[l-1] != '/') {
          matchbuf[l] = '/';
          matchbuf[l+1] = '\0';
          l++;
  @@ -4025,7 +4025,7 @@
   
           /* and now add the base-URL as replacement prefix */
           l = apr_cpystrn(substbuf, subst, sizeof(substbuf) - 1) - substbuf;
  -        if (substbuf[l-1] != '/') {
  +        if (!l || substbuf[l-1] != '/') {
              substbuf[l] = '/';
              substbuf[l+1] = '\0';
              l++;
  
  
  

Mime
View raw message