Mercurial > hg > xemacs-beta
diff src/lread.c @ 5606:7c383c5784ed
Zero-terminate when passing strings to parse_integer(), lread.c
src/ChangeLog addition:
2011-12-03 Aidan Kehoe <kehoea@parhasard.net>
* lread.c (read1):
Zero-terminate what we're giving to parse_integer(), it needs it
if it's calling bignum_set_string().
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 03 Dec 2011 15:55:14 +0000 |
parents | cc7f8a0e569a |
children | d69ea1ff4ce3 |
line wrap: on
line diff
--- a/src/lread.c Sat Dec 03 15:13:55 2011 +0000 +++ b/src/lread.c Sat Dec 03 15:55:14 2011 +0000 @@ -2711,13 +2711,15 @@ } Lstream_flush (XLSTREAM (Vread_buffer_stream)); + /* blasted terminating 0 */ + Lstream_put_ichar (XLSTREAM (Vread_buffer_stream), 0); parsed = parse_integer (resizing_buffer_stream_ptr (XLSTREAM (Vread_buffer_stream)), Lstream_byte_count (XLSTREAM - (Vread_buffer_stream)), - 10); + (Vread_buffer_stream)) + - 1, 10); found = assoc_no_quit (parsed, Vread_objects); if (c == '=')