Commit 17270835 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(read_avail_input): Make cbuf 1 char shorter.

parent 5f5783ce
......@@ -3027,7 +3027,10 @@ read_avail_input (expected)
nread = (*read_socket_hook) (0, buf, KBD_BUFFER_SIZE, expected, expected);
else
{
unsigned char cbuf[KBD_BUFFER_SIZE];
/* Using KBD_BUFFER_SIZE - 1 here avoids reading more than
the kbd_buffer can really hold. That may prevent loss
of characters on some systems when input is stuffed at us. */
unsigned char cbuf[KBD_BUFFER_SIZE - 1];
#ifdef FIONREAD
/* Find out how much input is available. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment