The Win32 message WM_GETTEXT takes maximum length and string (wchar_t*) arguments. Scintilla's implementation ignores the length argument.
When the length is shorter than needed for all of the text, this leads to exceptions within Scintilla which are translated to a bad status and failure to set the string result. This can cause application crashes. For example, when the NVDA screen reader requests some of the text from SciTE, SciTE may crash.
Attached is a potential fix along with tests.
Fixed with [d7aeda].
Related
Commit: [d7aeda]
Fixed with [d7aeda].
Related
Commit: [d7aeda]