mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00: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
0629f1dfa5
commit
5171dcb982
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user