mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-15 08:21:03 -04:00
csi: clamp color index for ‘CSI 38/48 ; 5 ; idx m’ sequences
Indexed color values are stored in the cell attributes as color indices (into the 256-color table). However, the index from the CSI was not validated in any way, meaning you can do something like this: echo -e ‘\e[38:5:1024m CRASH \e[m’ and foot will crash on an out-of-bounds access. Fix by clamping the color index. Closes #1111
This commit is contained in:
parent
0c60bb3f29
commit
87e4004960
2 changed files with 8 additions and 2 deletions
|
|
@ -82,10 +82,14 @@
|
|||
support the offered mime-types ([#1092][1092]).
|
||||
* Keyboard enter/leave events being ignored if there is no keymap
|
||||
([#1097][1097]).
|
||||
* Crash when application emitted an invalid `CSI 38;5;<idx>m`, `CSI
|
||||
38:5:<idx>m`, `CSI 48;5;<idx>m` or `CSI 48:5:<idx>m` sequence
|
||||
([#1111][1111]).
|
||||
|
||||
[1055]: https://codeberg.org/dnkl/foot/issues/1055
|
||||
[1092]: https://codeberg.org/dnkl/foot/issues/1092
|
||||
[1097]: https://codeberg.org/dnkl/foot/issues/1097
|
||||
[1111]: https://codeberg.org/dnkl/foot/issues/1111
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue