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 00:05:33 GMT
nd          2003/02/22 16:05:32

  Modified:    modules/mappers mod_rewrite.c
  Log:
  uh, oh. Fix possible 1-byte buffer overflow.
  
  Revision  Changes    Path
  1.140     +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.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- mod_rewrite.c	18 Feb 2003 20:35:28 -0000	1.139
  +++ mod_rewrite.c	23 Feb 2003 00:05:32 -0000	1.140
  @@ -4012,7 +4012,7 @@
       output = input;
   
       /* first create a match string which always has a trailing slash */
  -    l = apr_cpystrn(matchbuf, match, sizeof(matchbuf)) - matchbuf;
  +    l = apr_cpystrn(matchbuf, match, sizeof(matchbuf) - 1) - matchbuf;
       if (matchbuf[l-1] != '/') {
          matchbuf[l] = '/';
          matchbuf[l+1] = '\0';
  @@ -4024,7 +4024,7 @@
           output = apr_pstrdup(r->pool, output+l);
   
           /* and now add the base-URL as replacement prefix */
  -        l = apr_cpystrn(substbuf, subst, sizeof(substbuf)) - substbuf;
  +        l = apr_cpystrn(substbuf, subst, sizeof(substbuf) - 1) - substbuf;
           if (substbuf[l-1] != '/') {
              substbuf[l] = '/';
              substbuf[l+1] = '\0';
  
  
  

Mime
View raw message