st

my customized st build
git clone git://git.hanetzok.net/st
Log | Files | Refs | README | LICENSE

commit f7116fdb90cbd91ac85c41281d2eb7e4677873dc
parent 5a344ac946b1913d5da1677c6dbd75891d8ad67f
Author: Milos Nikic <nikic.milos@gmail.com>
Date:   Wed, 14 Jan 2026 21:00:32 -0800

st: guard tsetdirt() against zero-sized terminal

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:
Mst.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/st.c b/st.c @@ -975,6 +975,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);