1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-12 18:13:50 -05:00

Check the x argument to check_boundary() more carefully.

This is a minimal fix for CVE-2015-5309, and while it's probably
unnecessary now, it seems worth committing for defence in depth and to
give downstreams something reasonably non-intrusive to cherry-pick.
This commit is contained in:
Ben Harris 2015-10-13 20:33:12 +01:00
parent 6056396f77
commit 5936c55c7f

View File

@ -2344,7 +2344,7 @@ static void check_boundary(Terminal *term, int x, int y)
termline *ldata;
/* Validate input coordinates, just in case. */
if (x == 0 || x > term->cols)
if (x <= 0 || x > term->cols)
return;
ldata = scrlineptr(y);