mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -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:
parent
6056396f77
commit
5936c55c7f
@ -2344,7 +2344,7 @@ static void check_boundary(Terminal *term, int x, int y)
|
|||||||
termline *ldata;
|
termline *ldata;
|
||||||
|
|
||||||
/* Validate input coordinates, just in case. */
|
/* Validate input coordinates, just in case. */
|
||||||
if (x == 0 || x > term->cols)
|
if (x <= 0 || x > term->cols)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ldata = scrlineptr(y);
|
ldata = scrlineptr(y);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user