[vim/vim] libvterm: avoid CSI argument overflow (PR #19903)

2 views
Skip to first unread message

mattn

unread,
12:30 PM (9 hours ago) 12:30 PM
to vim/vim, Subscribed

Clamp oversized CSI numeric arguments before multiplying by 10 so libvterm does not overflow while parsing long digit sequences.

The failing linux (huge, clang, asan, 5.1) job hit UBSan in libvterm/src/parser.c when a terminal test fed a very large CSI argument and the parser evaluated 1111111111111111111 * 10 in a signed long.

This also extends the terminal test to cover both too many CSI arguments and an oversized numeric argument.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19903

Commit Summary

  • f210dd5 libvterm: avoid CSI argument overflow

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19903@github.com>

Reply all
Reply to author
Forward
0 new messages