Closed akovalenko closed 3 years ago
Hi Anton. Thanks for noticing this horrendous bug! It basically gives you free rein to overwrite the heap with zeros.
I totally overlooked the case of appending a non-null-terminated string to a null-terminated one. I'll add it to my list of bad things that may happen when dealing with null-terminated strings. It only keeps growing...
event.keyDown.text
is not a null-terminated string, so in theory it may contain null characters at any position, not just the first one. So a more sophisticated solution is needed -- I'll work on it. Thank you for the patch anyway.
Run tvedit, File->Open.., enter several Ctrl+@ characters (shown as spaces..), then backspace them. See tvedit crashes.
Fix might be like this: