msi: Protect custom actions with a structured exception handler.
This commit is contained in:
parent
52581b29bf
commit
9ed5c865e2
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue