From: Neal Norwitz Date: Sat, 19 May 2007 03:53:33 +0000 (+0000) Subject: Backport rev 55450: X-Git-Tag: v2.5.2c1~291 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f86ae691d34285e9c98ffb52d513aad1b61129c4;p=thirdparty%2FPython%2Fcpython.git Backport rev 55450: SF bug #1721309: Clear data so random memory does not get freed. --- diff --git a/Misc/NEWS b/Misc/NEWS index 67c4750c61df..bc0e974736e8 100644 --- 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 ------------- diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 9622c9044e24..f064878966f4 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -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)) {