httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
Date Thu, 30 Sep 2004 17:12:42 GMT
jim         2004/09/30 10:12:42

  Modified:    .        STATUS
               src      CHANGES
               src/modules/standard mod_rewrite.c
  Log:
  Add in most-likely last patch before 1.3.32
  
  Revision  Changes    Path
  1.1101    +1 -6      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.1100
  retrieving revision 1.1101
  diff -u -r1.1100 -r1.1101
  --- STATUS	22 Sep 2004 13:01:17 -0000	1.1100
  +++ STATUS	30 Sep 2004 17:12:41 -0000	1.1101
  @@ -50,11 +50,6 @@
   
   PROPOSED PATCHES FOR THIS RELEASE:
   
  -   *) mod_rewrite: Fix 0 bytes write into random memory position. PR 31036.
  -      (2.0 + 1.3)
  -         http://www.apache.org/~nd/dbmmap_1.3.patch
  -      +1: nd, trawick, jim
  -
      *) mod_rewrite:Fix query string handling for proxied URLs. PR 14518.
           modules/mappers/mod_rewrite.c: r1.259 (2.x patch - need 1.3 version)
         +1: nd
  
  
  
  1.1957    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1956
  retrieving revision 1.1957
  diff -u -r1.1956 -r1.1957
  --- CHANGES	30 Sep 2004 10:42:54 -0000	1.1956
  +++ CHANGES	30 Sep 2004 17:12:41 -0000	1.1957
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.32
   
  +  *) mod_rewrite: Fix 0 bytes write into random memory position.
  +     PR 31036. [André Malo]
  +
     *) mod_digest: Fix nonce string calculation since 1.3.31 which
        would force re-authentication for every connection if
        AuthDigestRealmSeed was not configured.  PR 30920.  [Joe Orton]
  
  
  
  1.197     +17 -12    apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- mod_rewrite.c	27 Aug 2004 19:29:57 -0000	1.196
  +++ mod_rewrite.c	30 Sep 2004 17:12:42 -0000	1.197
  @@ -3034,22 +3034,27 @@
       DBM *dbmfp = NULL;
       datum dbmkey;
       datum dbmval;
  -    char *value = NULL;
  -    char buf[MAX_STRING_LEN];
  +    char *value;
  +
  +    if (!(dbmfp = dbm_open(file, O_RDONLY, 0666))) {
  +        return NULL;
  +    }
   
       dbmkey.dptr  = key;
       dbmkey.dsize = strlen(key);
  -    if ((dbmfp = dbm_open(file, O_RDONLY, 0666)) != NULL) {
  -        dbmval = dbm_fetch(dbmfp, dbmkey);
  -        if (dbmval.dptr != NULL) {
  -            memcpy(buf, dbmval.dptr, 
  -                   dbmval.dsize < sizeof(buf)-1 ? 
  -                   dbmval.dsize : sizeof(buf)-1  );
  -            buf[dbmval.dsize] = '\0';
  -            value = ap_pstrdup(r->pool, buf);
  -        }
  -        dbm_close(dbmfp);
  +
  +    dbmval = dbm_fetch(dbmfp, dbmkey);
  +    if (dbmval.dptr) {
  +        value = ap_palloc(r->pool, dbmval.dsize + 1);
  +        memcpy(value, dbmval.dptr, dbmval.dsize);
  +        value[dbmval.dsize] = '\0';
       }
  +    else {
  +        value = NULL;
  +    }
  +
  +    dbm_close(dbmfp);
  +
       return value;
   }
   #endif
  
  
  

Mime
View raw message