Re: [PATCH v3] n_tty: Fix buffer overruns with larger-than-4k pastes

2013-12-10 Thread Peter Hurley
On 12/10/2013 01:15 AM, Stas Sergeev wrote: 09.12.2013 21:10, Peter Hurley пишет: On 12/09/2013 11:26 AM, Stas Sergeev wrote: 09.12.2013 18:50, Peter Hurley пишет: if (found && read_buf(ldata, eol) == __DISABLED_CHAR) { n--; eof_push = !n && ldata->read_tail != ldata-

Re: [PATCH v3] n_tty: Fix buffer overruns with larger-than-4k pastes

2013-12-09 Thread Stas Sergeev
09.12.2013 21:10, Peter Hurley пишет: On 12/09/2013 11:26 AM, Stas Sergeev wrote: 09.12.2013 18:50, Peter Hurley пишет: if (found && read_buf(ldata, eol) == __DISABLED_CHAR) { n--; eof_push = !n && ldata->read_tail != ldata->line_start; +ldata->push = 0;

Re: [PATCH v3] n_tty: Fix buffer overruns with larger-than-4k pastes

2013-12-09 Thread Peter Hurley
On 12/09/2013 11:26 AM, Stas Sergeev wrote: 09.12.2013 18:50, Peter Hurley пишет: if (found && read_buf(ldata, eol) == __DISABLED_CHAR) { n--; eof_push = !n && ldata->read_tail != ldata->line_start; + ldata->push = 0; } Will this wor

[PATCH v3] n_tty: Fix buffer overruns with larger-than-4k pastes

2013-12-09 Thread Peter Hurley
readline() inadvertently triggers an error recovery path when pastes larger than 4k overrun the line discipline buffer. The error recovery path discards input when the line discipline buffer is full and operating in canonical mode and no newline has been received. Because readline() changes the ter