summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-05-07 15:15:08 -0400
committerGlenn Morris <rgm@gnu.org>2013-05-07 15:15:08 -0400
commit15acfe419fe1ca82c0a806c600a7e6d000cd56a5 (patch)
tree8b2f87dec728cb4d74ebc152abfa51185413c41c /src/lread.c
parent54c57cc6c7d1f77933ccaed32284aabecfa4a7c8 (diff)
downloademacs-15acfe419fe1ca82c0a806c600a7e6d000cd56a5.tar.gz
* src/lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c3
1 files changed, 3 insertions, 0 deletions
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;