Commit 9ed5c865 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Protect custom actions with a structured exception handler.

parent 52581b29
......@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msi.dll
IMPORTLIB = libmsi.$(IMPLIBEXT)
IMPORTS = urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32
IMPORTS = urlmon wininet comctl32 shell32 shlwapi cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = odbccp32
EXTRALIBS = -luuid
......
......@@ -25,10 +25,12 @@
#include "winbase.h"
#include "winerror.h"
#include "msidefs.h"
#include "msipriv.h"
#include "winuser.h"
#include "msipriv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/exception.h"
WINE_DEFAULT_DEBUG_CHANNEL(msi);
......@@ -583,7 +585,19 @@ static DWORD WINAPI ACTION_CallDllFunction( const GUID *guid )
{
TRACE("calling %s\n", debugstr_w( info->target ) );
handle_msi_break( info->target );
r = fn( hPackage );
__TRY
{
r = fn( hPackage );
}
__EXCEPT_PAGE_FAULT
{
ERR("Custom action (%s:%s) caused a page fault: %08x\n",
debugstr_w(info->source), debugstr_w(info->target), GetExceptionCode());
r = ERROR_SUCCESS;
}
__ENDTRY;
MsiCloseHandle( hPackage );
}
else
......
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