This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Possible double memory free in str.replace
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.3, Python 3.4
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jcea, pitrou, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords: 3.3regression, needs review, patch

Created on 2012-10-12 22:33 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
dbl_mem_free.patch serhiy.storchaka, 2012-10-12 22:33 review
Messages (4)
msg172790 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-10-12 22:33
In the function replace() in the file Objects/unicodeobject.c possible double free memory pointed by buf1. release1 indicates if memory was allocated and deallocation needed. However there are places where memory temporary deallocated but flag was not cleared.
msg174426 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-11-01 16:12
Please review.
msg175816 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-11-17 22:30
New changeset 26e5234239ae by Antoine Pitrou in branch '3.3':
Issue #16215: Fix potential double memory free in str.replace().

New changeset 5f2624db78bd by Antoine Pitrou in branch 'default':
Issue #16215: Fix potential double memory free in str.replace().
msg175817 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-11-17 22:33
Committed, thank you.
Date User Action Args
2022-04-11 14:57:37adminsetgithub: 60419
2012-11-26 18:15:49jceasetnosy: + jcea
2012-11-17 22:33:19pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg175817

resolution: fixed
stage: patch review -> resolved
2012-11-17 22:30:50python-devsetnosy: + python-dev
messages: + msg175816
2012-11-01 16:12:40serhiy.storchakasetkeywords: + needs review

messages: + msg174426
2012-10-24 09:28:10serhiy.storchakasetstage: patch review
2012-10-13 11:48:06pitrousetnosy: + vstinner
2012-10-12 22:33:52serhiy.storchakacreate