Re: [PATCH] bracketed paste unterminated buffer

2024-05-20 Thread Chet Ramey
On 5/20/24 10:56 AM, Grisha Levit wrote: On Mon, May 20, 2024, 10:52 Chet Ramey > wrote: On 5/20/24 10:42 AM, Grisha Levit wrote: > If bracketed paste input terminates prior to the paste end sequence, How would this happen? The terminal emulator (or w

Re: [PATCH] bracketed paste unterminated buffer

2024-05-20 Thread Grisha Levit
On Mon, May 20, 2024, 10:52 Chet Ramey wrote: > On 5/20/24 10:42 AM, Grisha Levit wrote: > > If bracketed paste input terminates prior to the paste end sequence, > > How would this happen? The terminal emulator (or whatever) performing > the paste guarantees it. > Maybe over a serial connection

Re: [PATCH] bracketed paste unterminated buffer

2024-05-20 Thread Chet Ramey
On 5/20/24 10:42 AM, Grisha Levit wrote: If bracketed paste input terminates prior to the paste end sequence, How would this happen? The terminal emulator (or whatever) performing the paste guarantees it. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lon

[PATCH] bracketed paste unterminated buffer

2024-05-20 Thread Grisha Levit
If bracketed paste input terminates prior to the paste end sequence, the buffer passed to rl_insert_text never gets its null termination. $ bash-asan --norc -in <<<$'\e[200~X' ==15989==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x006167e51260 at pc 0x007e690b5374 bp 0x007ff50ab620 s