msi: Improve parsing of patch summary information.

This commit is contained in:
Hans Leidekker 2010-05-31 12:12:42 +02:00 committed by Alexandre Julliard
parent d17ebc4032
commit 35a0461baa
1 changed files with 25 additions and 0 deletions

View File

@ -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)
{