]> granicus.if.org Git - python/commitdiff
Backport rev 55450:
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 03:53:33 +0000 (03:53 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 03:53:33 +0000 (03:53 +0000)
SF bug #1721309: Clear data so random memory does not get freed.

Misc/NEWS
Modules/_bsddb.c

index 67c4750c61dfdfb215b2447b48ab1df0c70784fd..bc0e974736e8eb132ddc50428441038fc232fa83 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -35,6 +35,12 @@ Library
   run in verbose mode.
 
 
+Extension Modules
+-----------------
+
+- Bug #1721309: prevent bsddb module from freeing random memory.
+
+
 Documentation
 -------------
 
index 9622c9044e24d01c631d8b492936189cb1170f03..f064878966f47d57a9fe40e4f402e860b2df581e 100644 (file)
@@ -1713,6 +1713,7 @@ DB_get_both(DBObject* self, PyObject* args, PyObject* kwargs)
         return NULL;
     }
 
+    CLEAR_DBT(data);
     flags |= DB_GET_BOTH;
 
     if (CHECK_DBFLAG(self, DB_THREAD)) {