James Hawkins wrote:

@@ -1456,6 +1456,9 @@ static void msi_dialog_update_pathedit( prop = msi_dialog_dup_property( dialog, control->property, indirect ); path = msi_dup_property( dialog->package, prop );
+    if (!path)
+        path = prop;
+
     SetWindowTextW( control->hwnd, path );
     SendMessageW( control->hwnd, EM_SETSEL, 0, -1 );

Later on in that code block, it does:

    msi_free( path );
    msi_free( prop );

If path and prop point to the same thing, then we'll try free and illegal pointer.

Looks like it would be better to replace msi_dup_property() with another (new) macro function that understands this behavior, rather than changing the code similarly in 4 places.

Mike


Reply via email to