[dev] [st] OSC-52 payload being truncated

From: Suraj N. Kurapati <sunaku_AT_riseup.net>
Date: Tue, 15 Aug 2017 01:05:47 -0700


I'm using st master at 7f990328e4fec8dfaaad311cb8af2304b58c872e where
this OSC-52 payload is exceeding strescseq.buf's STR_BUF_SIZE length:


This triggers the following conditional in st.c, starting at line 2393:

    if (strescseq.len+len >= sizeof(strescseq.buf)-1) {
         * Here is a bug in terminals. If the user never sends
         * some code to stop the str or esc command, then st
         * will stop responding. But this is better than
         * silently failing with unknown characters. At least
         * then users will report back.
         * In the case users ever get fixed, here is the code:
         * term.esc = 0;
         * strhandle();

Going one frame above in the backtrace, to ttyread() on line 832, the
OSC-52 payload's last base64 unit "cw==" is currently being processed.

What's the best way to fix this? Is lengthening `strescseq.buf` okay?

Thanks for your consideration.

P.S. You can also watch an ASCII screencast of this issue at:

Received on Tue Aug 15 2017 - 10:05:47 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 15 2017 - 10:12:46 CEST