Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f10365bb
Commit
f10365bb
authored
Aug 01, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Aug 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Don't crash if an empty record is given to MsiProcessMessage.
parent
7edea0cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
package.c
dlls/msi/package.c
+4
-0
format.c
dlls/msi/tests/format.c
+26
-0
No files found.
dlls/msi/package.c
View file @
f10365bb
...
...
@@ -668,6 +668,10 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
action
=
MSI_RecordGetString
(
record
,
1
);
action_text
=
MSI_RecordGetString
(
record
,
2
);
if
(
!
action
||
!
action_text
)
return
IDOK
;
deformat_string
(
package
,
action_text
,
&
deformatted
);
len
=
strlenW
(
timet
)
+
strlenW
(
action
)
+
strlenW
(
template_s
);
...
...
dlls/msi/tests/format.c
View file @
f10365bb
...
...
@@ -1360,9 +1360,35 @@ static void test_formatrecord_package(void)
DeleteFile
(
filename
);
}
static
void
test_processmessage
(
void
)
{
static
const
CHAR
filename
[]
=
"winetest.msi"
;
MSIHANDLE
hrec
;
MSIHANDLE
package
;
int
r
;
package
=
helper_createpackage
(
filename
);
ok
(
package
!=
0
,
"Unable to create package
\n
"
);
hrec
=
MsiCreateRecord
(
3
);
ok
(
hrec
,
"failed to create record
\n
"
);
r
=
MsiRecordSetString
(
hrec
,
1
,
""
);
ok
(
r
==
ERROR_SUCCESS
,
"set string failed
\n
"
);
r
=
MsiProcessMessage
(
package
,
INSTALLMESSAGE_ACTIONSTART
,
hrec
);
ok
(
r
==
IDOK
,
"expected IDOK, got %i
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiCloseHandle
(
package
);
DeleteFile
(
filename
);
}
START_TEST
(
format
)
{
test_createpackage
();
test_formatrecord
();
test_formatrecord_package
();
test_processmessage
();
}
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