mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Correct an inequality sign causing the bounds check in Windows
palette_set() to be bogus. Fortunately, this isn't exploitable through the terminal emulator, because the palette escape sequence parser contains its own bounds check before even calling palette_set(). While I'm at it, fix the same goof in the OS X version! That port is more or less abandoned, but that's no excuse for leaving obviously wrong code lying around. [originally from svn r9965]
This commit is contained in:
@ -4805,7 +4805,7 @@ void palette_set(void *frontend, int n, int r, int g, int b)
|
||||
{
|
||||
if (n >= 16)
|
||||
n += 256 - 16;
|
||||
if (n > NALLCOLOURS)
|
||||
if (n >= NALLCOLOURS)
|
||||
return;
|
||||
real_palette_set(n, r, g, b);
|
||||
if (pal) {
|
||||
|
Reference in New Issue
Block a user