From: Glenn Morris Date: Tue, 7 May 2013 19:15:08 +0000 (-0400) Subject: * src/lread.c (readchar): Don't read from a dead buffer. (Bug#14280) X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~260 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=15acfe419fe1ca82c0a806c600a7e6d000cd56a5;p=emacs.git * src/lread.c (readchar): Don't read from a dead buffer. (Bug#14280) --- diff --git a/src/ChangeLog b/src/ChangeLog index 4b71eed9c21..cfa10f7bfb2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-05-07 Glenn Morris + + * lread.c (readchar): Don't read from a dead buffer. (Bug#14280) + 2013-05-07 Jan Djärv * xfns.c: Move misplaced ifndef USE_GTK from previous checkin. diff --git a/src/lread.c b/src/lread.c index 1a8a57e57a7..272f252cf7b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -201,6 +201,9 @@ readchar (Lisp_Object readcharfun, bool *multibyte) ptrdiff_t pt_byte = BUF_PT_BYTE (inbuffer); + if (! BUFFER_LIVE_P (inbuffer)) + return -1; + if (pt_byte >= BUF_ZV_BYTE (inbuffer)) return -1;