Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
549e55a3
Commit
549e55a3
authored
May 31, 2019
by
Zackery Spytz
Committed by
Berker Peksag
Jun 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-12202: Properly check MsiSummaryInfoGetProperty() calls in msilib (GH-13711)
parent
ed9f3562
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
Lib/test/test_msilib.py
Lib/test/test_msilib.py
+9
-0
Misc/NEWS.d/next/Library/2019-05-31-15-53-34.bpo-12202.nobzc9.rst
...S.d/next/Library/2019-05-31-15-53-34.bpo-12202.nobzc9.rst
+2
-0
PC/_msi.c
PC/_msi.c
+3
-0
No files found.
Lib/test/test_msilib.py
View file @
549e55a3
...
...
@@ -85,6 +85,7 @@ class MsiDatabaseTestCase(unittest.TestCase):
def
test_directory_start_component_keyfile
(
self
):
db
,
db_path
=
init_database
()
self
.
addCleanup
(
unlink
,
db_path
)
self
.
addCleanup
(
db
.
Close
)
feature
=
msilib
.
Feature
(
db
,
0
,
'Feature'
,
'A feature'
,
'Python'
)
cab
=
msilib
.
CAB
(
'CAB'
)
...
...
@@ -92,6 +93,14 @@ class MsiDatabaseTestCase(unittest.TestCase):
'SourceDir'
,
0
)
dir
.
start_component
(
None
,
feature
,
None
,
'keyfile'
)
def
test_getproperty_uninitialized_var
(
self
):
db
,
db_path
=
init_database
()
self
.
addCleanup
(
unlink
,
db_path
)
self
.
addCleanup
(
db
.
Close
)
si
=
db
.
GetSummaryInformation
(
0
)
with
self
.
assertRaises
(
msilib
.
MSIError
):
si
.
GetProperty
(
-
1
)
class
Test_make_id
(
unittest
.
TestCase
):
#http://msdn.microsoft.com/en-us/library/aa369212(v=vs.85).aspx
...
...
Misc/NEWS.d/next/Library/2019-05-31-15-53-34.bpo-12202.nobzc9.rst
0 → 100644
View file @
549e55a3
Fix the error handling in :meth:`msilib.SummaryInformation.GetProperty`. Patch
by Zackery Spytz.
PC/_msi.c
View file @
549e55a3
...
...
@@ -571,6 +571,9 @@ summary_getproperty(msiobj* si, PyObject *args)
status
=
MsiSummaryInfoGetProperty
(
si
->
h
,
field
,
&
type
,
&
ival
,
&
fval
,
sval
,
&
ssize
);
}
if
(
status
!=
ERROR_SUCCESS
)
{
return
msierror
(
status
);
}
switch
(
type
)
{
case
VT_I2
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment