a fork of https://st.suckless.org with some patches and zig build
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
magras a8cb8e9454 fix use after free in font caching algorithm
Current font caching algorithm contains a use after free error. A font
removed from `frc` might be still listed in `wx.specbuf`. It will lead
to a crash inside `XftDrawGlyphFontSpec()`.

Steps to reproduce:
$ st -f 'Misc Tamsyn:scalable=false'
$ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt

Of course, result depends on fonts installed on a system and fontconfig.
In my case, I'm getting consistent segfaults with different fonts.

I replaced a fixed array with a simple unbounded buffer with a constant
growth rate. Cache starts with a capacity of 0, gets increments by 16,
and never shrinks. On my machine after `cat UTF-8-demo.txt` buffer
reaches a capacity of 192. During casual use capacity stays at 0.
6 years ago
FAQ Fix FAQ typo 7 years ago
LEGACY LEGACY: typo. 12 years ago
LICENSE LICENSE: fix a few years 7 years ago
Makefile Makefile: fix dependencies on config.h 6 years ago
README tic -s -> tic -sx (Treat unknown capabilities as user-defined.) 8 years ago
TODO Remove old TODO entry. 10 years ago
arg.h don't modify argv, use a counter 7 years ago
config.def.h config: add Shift+Insert as selpaste() again 6 years ago
config.mk bump version to 0.8.2 6 years ago
st.1 Remove the ISO 14755 feature 6 years ago
st.c better Input Method Editor (IME) support 6 years ago
st.h Remove the ISO 14755 feature 6 years ago
st.info Add dim/smxx/rmxx to terminfo, remove duplicate kich1 7 years ago
win.h better Input Method Editor (IME) support 6 years ago
x.c fix use after free in font caching algorithm 6 years ago

README

st - simple terminal
--------------------
st is a simple terminal emulator for X which sucks less.


Requirements
------------
In order to build st you need the Xlib header files.


Installation
------------
Edit config.mk to match your local setup (st is installed into
the /usr/local namespace by default).

Afterwards enter the following command to build and install st (if
necessary as root):

    make clean install


Running st
----------
If you did not install st with make clean install, you must compile
the st terminfo entry with the following command:

    tic -sx st.info

See the man page for additional details.

Credits
-------
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.