changeset 4439:f4eb31866c38

Fix reader crash. 2008-03-15 Michael Sperber <mike@xemacs.org> * lread.c (read1): Signal an error on ?\<newline>, thus preventing an assertion failure higher up.
author Mike Sperber <sperber@deinprogramm.de>
date Sat, 15 Mar 2008 12:21:11 +0100
parents 2785829fe37c
children e4225b6d9389
files src/ChangeLog src/lread.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Mar 12 19:37:49 2008 +0100
+++ b/src/ChangeLog	Sat Mar 15 12:21:11 2008 +0100
@@ -1,3 +1,8 @@
+2008-03-15  Michael Sperber  <mike@xemacs.org>
+
+	* lread.c (read1): Signal an error on ?\<newline>, thus preventing
+	an assertion failure higher up.
+
 2008-03-11  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* specifier.c (CHECK_INSTANCE_ENTRY): Fix typo in comment.
--- a/src/lread.c	Wed Mar 12 19:37:49 2008 +0100
+++ b/src/lread.c	Sat Mar 15 12:21:11 2008 +0100
@@ -2763,6 +2763,8 @@
 
 	if (c == '\\')
 	  c = read_escape (readcharfun);
+	if (c < 0)
+	  return Fsignal (Qinvalid_read_syntax, list1 (READCHARFUN_MAYBE (readcharfun)));
 	return make_char (c);
       }