From 15acfe419fe1ca82c0a806c600a7e6d000cd56a5 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 7 May 2013 15:15:08 -0400 Subject: * src/lread.c (readchar): Don't read from a dead buffer. (Bug#14280) --- src/lread.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lread.c') 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; -- cgit v1.2.1