Mercurial > hg > xemacs-beta
changeset 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 | 1a507c4c6c42 |
files | src/ChangeLog src/lread.c |
diffstat | 2 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Dec 03 15:13:55 2011 +0000 +++ b/src/ChangeLog Sat Dec 03 15:55:14 2011 +0000 @@ -1,3 +1,9 @@ +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(). + 2011-12-03 Aidan Kehoe <kehoea@parhasard.net> * lread.c (read1):
--- 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 == '=')