diff options
author | Christian Duerr <contact@christianduerr.com> | 2018-08-11 16:52:13 +0200 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2018-08-13 09:01:23 -0700 |
commit | b684bb8bd80637da85693daff48f3a84bb073a0c (patch) | |
tree | c0eddf46778a498d467ad62d1f4ae53dcfc3cf79 /codegen/src | |
parent | fe116505000826c42f6f0ac2e598d7fe19217588 (diff) | |
download | r-alacritty-vte-b684bb8bd80637da85693daff48f3a84bb073a0c.tar.gz r-alacritty-vte-b684bb8bd80637da85693daff48f3a84bb073a0c.tar.bz2 r-alacritty-vte-b684bb8bd80637da85693daff48f3a84bb073a0c.zip |
Fix off-by-one error when parsing CSI escapes
The CSI escape sequences are limited to 16 parameters using the
`MAX_PARAMS` constant.
To make sure no more params are parsed, the CSI parser stops when the
parameter index reaches `MAX_PARAMS`, however this means that it stops
at index 16, which means that the number of params would be 17 since
arrays start at 0.
To fix this off-by-one error the CSI parser now stops when the index
reaches `MAX_PARAMS - 1`, which means it will stop when the index
reaches the last element in an array with `MAX_PARAMS` number of
elements.
This fixes jwilm/alacritty#1505.
Diffstat (limited to 'codegen/src')
0 files changed, 0 insertions, 0 deletions