msi: Only allow valid styles in msi_dialog_get_style.

This commit is contained in:
James Hawkins 2007-05-06 20:28:13 -05:00 committed by Alexandre Julliard
parent 4ccee1ae49
commit 7f4a4e161f
1 changed files with 3 additions and 3 deletions

View File

@ -265,11 +265,11 @@ static LPWSTR msi_dialog_get_style( LPCWSTR p, LPCWSTR *rest )
while ((first = strchrW( p, '{' )) && (q = strchrW( first + 1, '}' )))
{
p = first + 1;
if( *p == '\\' || *p == '&' )
p++;
if( *p != '\\' && *p != '&' )
return NULL;
/* little bit of sanity checking to stop us getting confused with RTF */
for( i=p; i<q; i++ )
for( i=++p; i<q; i++ )
if( *i == '}' || *i == '\\' )
return NULL;
}