From 59f58aaeed2d1b4062c460ad7f7f5069d4f7572c Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 19 May 2007 03:48:47 +0000 Subject: [PATCH] Clear data so random memory does not get freed. Will backport. --- Misc/NEWS | 2 ++ Modules/_bsddb.c | 1 + 2 files changed, 3 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 83f3da18ab..87379b1ee6 100644 --- 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 diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index ed7eb68607..cc99926214 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -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)) { -- 2.40.0