From c63673a1d8f4774bfcbd01c11d7cb4fc09b9fb2c Mon Sep 17 00:00:00 2001 From: dail8859 Date: Thu, 6 Apr 2017 07:11:44 -0400 Subject: [PATCH] Fix buffer overrun for wordchar list --- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 966f881b0..19df601ae 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -303,6 +303,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) auto defaultCharListLen = execute(SCI_GETWORDCHARS); char *defaultCharList = new char[defaultCharListLen + 1]; execute(SCI_GETWORDCHARS, 0, reinterpret_cast(defaultCharList)); + defaultCharList[defaultCharListLen] = '\0'; _defaultCharList = defaultCharList; delete[] defaultCharList; }