Problem: Accumulating CSI argument digits without an upper bound causes
signed integer overflow when the argument exceeds LONG_MAX.
Solution: Skip further digit accumulation once the value would overflow
LONG_MAX.
Supported by AI
https://github.com/vim/vim/pull/19894
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I assume the (LONG_MAX - 9) / 10 style check was meant to avoid signed overflow in arg * 10 + digit. But I do not think that is quite the right boundary for CSI args here, since the parser is not really using the full long value domain for numeric arguments.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()