Bug#1110769: xterm: segfault in ScrnWriteText on 3-byte binary data
On 2025-08-11 01:09:26 +0200, Vincent Lefevre wrote:
> I've just noticed that it is very easy to make xterm crash with
> some binary data:
>
> /usr/bin/xterm -e 'printf "\x9a\x85\x08"; sleep 2'
Something important: this depends on the xterm settings.
One needs the following in the XTerm resources:
*allowC1Printable: true
*VT100.reverseWrap: true
/usr/share/doc/xterm/ctlseqs.txt.gz says
ESC E
Next Line (NEL is 0x85).
ESC Z
Return Terminal ID (DECID is 0x9a). Obsolete form of CSI c (DA).
So, to restrict to ASCII:
/usr/bin/xterm -e 'printf "\eZ\n\x08"; sleep 2'
which still makes xterm segfault. And with this one, one just needs
*VT100.reverseWrap: true
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Reply to: