]> granicus.if.org Git - python/commitdiff
Clear data so random memory does not get freed. Will backport.
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 03:48:47 +0000 (03:48 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 19 May 2007 03:48:47 +0000 (03:48 +0000)
Misc/NEWS
Modules/_bsddb.c

index 83f3da18abd04bb43e7adabac5150258fdc37bd3..87379b1ee6f9e191022171021f948dce7c58ba89 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -636,6 +636,8 @@ Library
 Extension Modules
 -----------------
 
+- Bug #1721309: prevent bsddb module from freeing random memory.
+
 - Bug #1686475: Support stat'ing open files on Windows again.
 
 - Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
index ed7eb68607890e6d5f6bf815e8569741a7b3b19a..cc99926214eb9adf66190f626bdd1ed66baff2a7 100644 (file)
@@ -1731,6 +1731,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)) {