Issue 16215: Possible double memory free in str.replace (original) (raw)

Issue16215

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

Files
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(). http://hg.python.org/cpython/rev/26e5234239ae New changeset 5f2624db78bd by Antoine Pitrou in branch 'default': Issue #16215: Fix potential double memory free in str.replace(). http://hg.python.org/cpython/rev/5f2624db78bd
msg175817 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-11-17 22:33
Committed, thank you.
History
Date User Action Args
2022-04-11 14:57:37 admin set github: 60419
2012-11-26 18:15:49 jcea set nosy: + jcea
2012-11-17 22:33:19 pitrou set status: open -> closednosy: + pitroumessages: + resolution: fixedstage: patch review -> resolved
2012-11-17 22:30:50 python-dev set nosy: + python-devmessages: +
2012-11-01 16:12:40 serhiy.storchaka set keywords: + needs reviewmessages: +
2012-10-24 09:28:10 serhiy.storchaka set stage: patch review
2012-10-13 11:48:06 pitrou set nosy: + vstinner
2012-10-12 22:33:52 serhiy.storchaka create