# HG changeset patch # User Karoly Lorentey # Date 1077756730 0 # Node ID 8cfc953cfadf8645d93b7924e15d89c64975b3ad # Parent bff8fa30c0181ea7d914a0dd7958c7fbb78cb432 (Sigh.) Don't try to read more events than the buffer size. src/xterm.c (XTread_socket): Don't try to read more events than numchars. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-102 diff -r bff8fa30c018 -r 8cfc953cfadf src/xterm.c --- a/src/xterm.c Thu Feb 26 00:39:34 2004 +0000 +++ b/src/xterm.c Thu Feb 26 00:52:10 2004 +0000 @@ -7205,7 +7205,7 @@ #endif #ifndef USE_GTK - while (XPending (dpyinfo->display)) + while (numchars > 0 && XPending (dpyinfo->display)) { int finish;