classification
Title: Check status returns in msilib.SummaryInformation.GetProperty()
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, berker.peksag, loewis, markm, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2011-05-28 13:59 by markm, last changed 2019-06-01 01:11 by ZackerySpytz. This issue is now closed.

Files
File name Uploaded Description Edit
ensure_MsiSummaryInfoGetProperty_return_value_checked.patch markm, 2011-05-28 14:23 patch to check return value (and some tests)
Pull Requests
URL Status Linked Edit
PR 13711 merged ZackerySpytz, 2019-05-31 21:55
PR 13712 closed ZackerySpytz, 2019-06-01 01:11
Messages (5)
msg137132 - (view) Author: Mark Mc Mahon (markm) * Date: 2011-05-28 13:59
Per Eric V. Smith's comment issue1104 (msg134976) the return value of the call MsiSummaryInfoGetProperty() in summary_getproperty() (pc\_msi.c) is only checked for the error return ERROR_MORE_DATA.

Other error values should be checked.
msg137134 - (view) Author: Mark Mc Mahon (markm) * Date: 2011-05-28 14:23
I have added tests to the patch - but it's not easy to know what would cause an error in MsiSummaryInfoGetProperty which would trigger the new code.
msg242647 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-05-06 07:10
The code change to _msi.c is minimal, the bulk of the patch is additional test code.  I think we could still use this.  Thoughts?

See also #1104.
msg344132 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-05-31 22:01
This issue needs to be fixed. Passing an invalid value to SummaryInformation.GetProperty() will cause the first MsiSummaryInfoGetProperty() call to fail. As the call is not properly checked, the "type" variable will then be used uninitialized in summary_getproperty().
msg344140 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2019-06-01 00:16
New changeset 549e55a3086d04c13da9b6f33214f6399681292a by Berker Peksag (Zackery Spytz) in branch 'master':
bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711)
https://github.com/python/cpython/commit/549e55a3086d04c13da9b6f33214f6399681292a
History
Date User Action Args
2019-06-01 01:11:26ZackerySpytzsetpull_requests: + pull_request13599
2019-06-01 00:16:49berker.peksagsetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: - Python 2.7, Python 3.7
2019-06-01 00:16:31berker.peksagsetmessages: + msg344140
2019-05-31 22:01:43ZackerySpytzsetversions: + Python 2.7, Python 3.7, Python 3.8
nosy: + ZackerySpytz

messages: + msg344132

type: behavior
2019-05-31 21:55:49ZackerySpytzsetstage: patch review
pull_requests: + pull_request13598
2017-11-19 13:55:23BreamoreBoysetnosy: - BreamoreBoy
2017-11-19 07:09:04berker.peksagsetnosy: + berker.peksag
2015-05-06 07:10:37BreamoreBoysetnosy: + tim.golden, BreamoreBoy, zach.ware, steve.dower
messages: + msg242647
components: + Windows
2011-05-28 14:23:53markmsetfiles: + ensure_MsiSummaryInfoGetProperty_return_value_checked.patch
keywords: + patch
messages: + msg137134
2011-05-28 13:59:35markmcreate