# HG changeset patch # User Aidan Kehoe # Date 1322927714 0 # Node ID 7c383c5784edcea0694661cfebd7ae4e613d7e7b # Parent cc7f8a0e569aefdf14d87009e97ea7168be2259e Zero-terminate when passing strings to parse_integer(), lread.c src/ChangeLog addition: 2011-12-03 Aidan Kehoe * lread.c (read1): Zero-terminate what we're giving to parse_integer(), it needs it if it's calling bignum_set_string(). diff -r cc7f8a0e569a -r 7c383c5784ed src/ChangeLog --- 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 + + * 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 * lread.c (read1): diff -r cc7f8a0e569a -r 7c383c5784ed src/lread.c --- 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 == '=')