Commit e1a63fd5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Pass the control name to ControlEvent_SubscribeToEvent instead of uninitialized memory.

parent 35a0461b
...@@ -774,7 +774,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -774,7 +774,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
{ {
msi_control *control; msi_control *control;
struct msi_text_info *info; struct msi_text_info *info;
LPCWSTR text, ptr, prop; LPCWSTR text, ptr, prop, control_name;
LPWSTR font_name; LPWSTR font_name;
TRACE("%p %p\n", dialog, rec); TRACE("%p %p\n", dialog, rec);
...@@ -787,6 +787,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -787,6 +787,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
if( !info ) if( !info )
return ERROR_SUCCESS; return ERROR_SUCCESS;
control_name = MSI_RecordGetString( rec, 2 );
control->attributes = MSI_RecordGetInteger( rec, 8 ); control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 ); prop = MSI_RecordGetString( rec, 9 );
control->property = msi_dialog_dup_property( dialog, prop, FALSE ); control->property = msi_dialog_dup_property( dialog, prop, FALSE );
...@@ -805,7 +806,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -805,7 +806,7 @@ static UINT msi_dialog_text_control( msi_dialog *dialog, MSIRECORD *rec )
SetPropW( control->hwnd, szButtonData, info ); SetPropW( control->hwnd, szButtonData, info );
ControlEvent_SubscribeToEvent( dialog->package, dialog, ControlEvent_SubscribeToEvent( dialog->package, dialog,
szSelectionPath, control->name, szSelectionPath ); szSelectionPath, control_name, szSelectionPath );
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
...@@ -2390,7 +2391,7 @@ done: ...@@ -2390,7 +2391,7 @@ done:
static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec ) static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
{ {
msi_control *control; msi_control *control;
LPCWSTR prop; LPCWSTR prop, control_name;
MSIPACKAGE *package = dialog->package; MSIPACKAGE *package = dialog->package;
DWORD style; DWORD style;
struct msi_selection_tree_info *info; struct msi_selection_tree_info *info;
...@@ -2410,6 +2411,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -2410,6 +2411,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
} }
control->handler = msi_dialog_seltree_handler; control->handler = msi_dialog_seltree_handler;
control_name = MSI_RecordGetString( rec, 2 );
control->attributes = MSI_RecordGetInteger( rec, 8 ); control->attributes = MSI_RecordGetInteger( rec, 8 );
prop = MSI_RecordGetString( rec, 9 ); prop = MSI_RecordGetString( rec, 9 );
control->property = msi_dialog_dup_property( dialog, prop, FALSE ); control->property = msi_dialog_dup_property( dialog, prop, FALSE );
...@@ -2422,7 +2424,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec ) ...@@ -2422,7 +2424,7 @@ static UINT msi_dialog_selection_tree( msi_dialog *dialog, MSIRECORD *rec )
SetPropW( control->hwnd, szButtonData, info ); SetPropW( control->hwnd, szButtonData, info );
ControlEvent_SubscribeToEvent( dialog->package, dialog, ControlEvent_SubscribeToEvent( dialog->package, dialog,
szSelectionPath, control->name, szProperty ); szSelectionPath, control_name, szProperty );
/* initialize it */ /* initialize it */
msi_seltree_create_imagelist( control->hwnd ); msi_seltree_create_imagelist( control->hwnd );
......
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