Commit 35a0461b authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Improve parsing of patch summary information.

parent d17ebc40
......@@ -496,6 +496,7 @@ UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch )
{
MSIPATCHINFO *pi;
UINT r = ERROR_SUCCESS;
WCHAR *p;
pi = msi_alloc_zero( sizeof(MSIPATCHINFO) );
if (!pi)
......@@ -508,6 +509,30 @@ UINT msi_parse_patch_summary( MSISUMMARYINFO *si, MSIPATCHINFO **patch )
return ERROR_OUTOFMEMORY;
}
p = pi->patchcode;
if (*p != '{')
{
msi_free( pi->patchcode );
msi_free( pi );
return ERROR_PATCH_PACKAGE_INVALID;
}
p = strchrW( p + 1, '}' );
if (!p)
{
msi_free( pi->patchcode );
msi_free( pi );
return ERROR_PATCH_PACKAGE_INVALID;
}
if (p[1])
{
FIXME("patch obsoletes %s\n", debugstr_w(p + 1));
p[1] = 0;
}
TRACE("patch code %s\n", debugstr_w(pi->patchcode));
pi->transforms = msi_suminfo_dup_string( si, PID_LASTAUTHOR );
if (!pi->transforms)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment