]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add in most-likely last patch before 1.3.32
authorJim Jagielski <jim@apache.org>
Thu, 30 Sep 2004 17:12:42 +0000 (17:12 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 30 Sep 2004 17:12:42 +0000 (17:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@105355 13f79535-47bb-0310-9956-ffa450edef68

STATUS
src/CHANGES
src/modules/standard/mod_rewrite.c

diff --git a/STATUS b/STATUS
index b84958ccc3de8824d6a48dfdf4b960b6d2c4aead..683e4c9e8ade86748544c7c159b9b7ee6753e29e 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 1.3 STATUS:                                             -*-text-*-
-  Last modified at [$Date: 2004/09/22 13:01:17 $]
+  Last modified at [$Date: 2004/09/30 17:12:41 $]
 
 Release:
 
@@ -50,11 +50,6 @@ RELEASE SHOWSTOPPERS:
 
 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
index 598b676b662ab90dc17c5738917b88b42c51b011..ac1d5c8f5adef732763bc9479e58e87a4ca11157 100644 (file)
@@ -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]
index ccace1e873d7958e6783ea4669c313f717e5752b..7e837987bed15a841c10f06ea5dada05cca950ed 100644 (file)
@@ -3034,22 +3034,27 @@ static char *lookup_map_dbmfile(request_rec *r, char *file, char *key)
     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