Add a bounds check in the word-by-word selection code to prevent
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 17 Dec 2012 08:40:33 +0000 (08:40 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 17 Dec 2012 08:40:33 +0000 (08:40 +0000)
commit1d2a5e0b5bf87a0a0c8a02a3f06b7c9a1f426d9f
tree674947010b4f858110ae3341af47bbd4cae7e9d8
parente9ad953c8fcd27466d3a10ae344fb2122cc6b97b
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.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9726 cda61777-01e9-0310-a592-d414129be87e
terminal.c