]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
Add a bounds check in the word-by-word selection code to prevent
authorSimon Tatham <anakin@pobox.com>
Mon, 17 Dec 2012 08:40:33 +0000 (08:40 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 17 Dec 2012 08:40:33 +0000 (08:40 +0000)
commitdbcd633985899cac96ecf605716dcacfdfe24237
tree674947010b4f858110ae3341af47bbd4cae7e9d8
parentc3df7b9b1562ab804453bf3f3e3d3db93699c26c
Add a bounds check in the word-by-word selection code to prevent
attempting to call lineptr() with a y-coordinate off the bottom of the
screen and triggering the dreaded 'line==NULL' message box.

This crash can only occur if the bottommost line of the screen has the
LATTR_WRAPPED flag set, which as far as I can see you can only
contrive by constructing a LATTR_WRAPPED line further up the screen
and then moving it down using an insert-line escape sequence. That's
probably why this bug has been around forever without anyone coming
across it.

[originally from svn r9726]
terminal.c