-
Notifications
You must be signed in to change notification settings - Fork 12
Creating Snippet from Selection crashes Notepad++ #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I can confirm this issue on the 32bit Version: Notepad++ Version 7.5.3 (32 bit) |
Even having this issue on simply creating a new empty snippet (name: test, type: XML, nothing else) Notepad++ v7.5.6 (32 bit) |
Confirm crash creating new from selection. NPP 7.5.6 64bit, Snippets 1.4.0 |
Callstack for the problem of adding a new entry with name "test" and empty "before cursor" entry:
this is caused by sql table definition for snippets:
and SqliteStatement::Bind(int col, const WCHAR* val)
, which sets empty input to null. |
Issue with selections is caused by a buffer overrun issue in: Snippet::SetBeforeSelection() with the handling of MultiByteToWideChar (https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar) not using size of chars correctly. |
When using the user interface to create snippets:
If the selection in the Notepad++ document is copied to the clipboard the process works if "Add from Clipboard" is selected the process works as expected.
Notepad++ Version 7.5.3 (64 bit)
NPPSnippets Version 1.4.0, released on 24-May-2017
The text was updated successfully, but these errors were encountered: