https://bugs.winehq.org/show_bug.cgi?id=16808
--- Comment #19 from Damjan Jovanovic damjan.jov@gmail.com --- Patch sent: https://source.winehq.org/patches/data/173272
The problem is:
comctl32: cchTextMax in TVN_ENDLABELEDIT should be the full buffer size
In Password Safe, when the user edits a tree view label, and removes brackets, the application wants to restore the original, longer string. It does this by editing pszText within the TVITEM. It determines the length of the buffer from cchTextMax. Windows passes 260 and all is well. Wine passes strlenW(pszText)+1, which is of minimal length, and trying to copy a longer string into it causes the MSVC runtime to falsely detect a buffer overflow and raise an exception, crashing the application.
Let's pass 260 like Windows.