Repository navigation
Closed
Labels
Description
| BPO | 23855 |
|---|---|
| Nosy | @tjguk, @berkerpeksag, @zware, @zooba, @ZackerySpytz, @miss-islington |
| PRs | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = <Date 2018-09-08.01:59:29.435>
created_at = <Date 2015-04-02.22:11:43.674>
labels = ['3.8', 'type-bug', '3.7', 'OS-windows']
title = 'Missing Sanity Check for malloc() in PC/_msi.c'
updated_at = <Date 2018-09-11.06:52:17.237>
user = 'https://bugs.python.org/dogbert2'bugs.python.org fields:
activity = <Date 2018-09-11.06:52:17.237>
actor = 'ZackerySpytz'
assignee = 'none'
closed = True
closed_date = <Date 2018-09-08.01:59:29.435>
closer = 'berker.peksag'
components = ['Windows']
creation = <Date 2015-04-02.22:11:43.674>
creator = 'dogbert2'
dependencies = []
files = ['38811', '38847']
hgrepos = []
issue_num = 23855
keywords = ['patch']
message_count = 7.0
messages = ['239948', '240159', '324492', '324803', '324808', '324934', '324935']
nosy_count = 7.0
nosy_names = ['tim.golden', 'berker.peksag', 'zach.ware', 'steve.dower', 'dogbert2', 'ZackerySpytz', 'miss-islington']
pr_nums = ['9038', '9110', '9115', '9116']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue23855'
versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']
Activity
dogbert2 commentedon Apr 2, 2015
Hello All,
In reviewing code in Python-3.4.3/PC/_msi.c, I found a call to malloc() at line 326 in function 'static PyObject* msierror(int status)' in which the call is made and assigned to variable 'res', but no check for NULL, indicating failure is made afterwards. The patch below corrects this issue:
dogbert2 commentedon Apr 6, 2015
In directory 'PC', file '_msi.c', I found another call to
malloc() which was not checked for a return value of NULL
which would indicate failure. The new patch file is below:
ZackerySpytz commentedon Sep 3, 2018
The suggested patch is not acceptable: MemoryError should be raised in the unlikely event of a malloc() failure, there's a missing call to MsiCloseHandle(), the use of tabs violates PEP-7, and there's a blatant syntax error.
berkerpeksag commentedon Sep 7, 2018
New changeset 4e51937 by Berker Peksag (Zackery Spytz) in branch 'master':
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
4e51937
miss-islington commentedon Sep 7, 2018
New changeset 7399407 by Miss Islington (bot) in branch '3.7':
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
7399407
miss-islington commentedon Sep 10, 2018
New changeset f51a466 by Miss Islington (bot) in branch '2.7':
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
f51a466
miss-islington commentedon Sep 10, 2018
New changeset 8a0c254 by Miss Islington (bot) in branch '3.6':
bpo-23855: Add missing NULL checks for malloc() in _msi.c (GH-9038)
8a0c254