Bump to 688f70a. 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. https://git.suckless.org/st/commit/688f70add0d1da8a416bf7df763328d694a24a3a.html
This commit is contained in:
parent
721a690877
commit
dab1ddca8c
2 changed files with 4 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (6e97047, 2025-08-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (688f70a, 2026-01-15) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
|
||||||
|
|
||||||
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
|
||||||
```c
|
```c
|
||||||
|
|
|
||||||
3
st.c
3
st.c
|
|
@ -1102,6 +1102,9 @@ tsetdirt(int top, int bot)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (term.row <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
LIMIT(top, 0, term.row-1);
|
LIMIT(top, 0, term.row-1);
|
||||||
LIMIT(bot, 0, term.row-1);
|
LIMIT(bot, 0, term.row-1);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue