mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 05:22:47 -05:00
More sensible (and also more idiomatic) bounds checking on esc_args.
[originally from svn r9027]
This commit is contained in:
@ -3290,8 +3290,8 @@ static void term_out(Terminal *term)
|
|||||||
}
|
}
|
||||||
term->termstate = SEEN_CSI;
|
term->termstate = SEEN_CSI;
|
||||||
} else if (c == ';') {
|
} else if (c == ';') {
|
||||||
if (++term->esc_nargs <= ARGS_MAX)
|
if (term->esc_nargs < ARGS_MAX)
|
||||||
term->esc_args[term->esc_nargs - 1] = ARG_DEFAULT;
|
term->esc_args[term->esc_nargs++] = ARG_DEFAULT;
|
||||||
term->termstate = SEEN_CSI;
|
term->termstate = SEEN_CSI;
|
||||||
} else if (c < '@') {
|
} else if (c < '@') {
|
||||||
if (term->esc_query)
|
if (term->esc_query)
|
||||||
|
Reference in New Issue
Block a user