diff options
| author | Milos Nikic <[email protected]> | 2026-01-14 21:00:32 -0800 |
|---|---|---|
| committer | Hiltjo Posthuma <[email protected]> | 2026-01-16 14:12:07 +0100 |
| commit | 688f70add0d1da8a416bf7df763328d694a24a3a (patch) | |
| tree | dff22bfe5370b282d60bdd3523812a48da99c500 /st.c | |
| parent | 0723b7e39e73b2bcfce047b047f6e795d6184028 (diff) | |
tsetdirt() assumes term.row > 0. During early init or
resize paths this may not hold, leading to out-of-bounds
access. Bail out early if there are no rows.
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -965,6 +965,9 @@ tsetdirt(int top, int bot) { int i; + if (term.row <= 0) + return; + LIMIT(top, 0, term.row-1); LIMIT(bot, 0, term.row-1); |
