]> git.tuebingen.mpg.de Git - paraslash.git/commit
gui: Discard overlong input lines.
authorAndre Noll <maan@systemlinux.org>
Mon, 18 Mar 2013 19:13:35 +0000 (20:13 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 2 May 2013 17:56:08 +0000 (19:56 +0200)
commita44fa6f118540d47cc575cbc62d22a6e4bb784e9
tree13d7f4ce83f75d67563b10fd1e477ec2d90520fd
parent9c5fbc5dd8b53604d7e73fb6714ee2b5e3458866
gui: Discard overlong input lines.

If an external command produces output without newlines, the current
code ends up calling read_nonblock() with a buffer size of zero which
triggers the assertion in readv_nonblock().

Increase the output buffer to 32K and fix the problem by simply
discarding all input if the input buffer is full and contains no
newline character.

A better fix would be to discard everything until the next newline
character is read, but this requires more work, so let's go with this
simple fix for now.
gui.c