From 194475ce645be276bfbb7c0546fd7aa50949d26c Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 18 Feb 2019 01:27:26 +0100 Subject: [PATCH] [EU-FOSSA] Fix a crash bug on Macro execution with arbitrary parameters --- PowerEditor/src/ScitillaComponent/ScintillaEditView.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h index b397acaa..8a0bd09a 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.h @@ -223,7 +223,13 @@ public: virtual void init(HINSTANCE hInst, HWND hPere); LRESULT execute(UINT Msg, WPARAM wParam=0, LPARAM lParam=0) const { - return _pScintillaFunc(_pScintillaPtr, Msg, wParam, lParam); + try { + return _pScintillaFunc(_pScintillaPtr, Msg, wParam, lParam); + } + catch (...) + { + return -1; + } }; void activateBuffer(BufferID buffer);