Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5605:cc7f8a0e569a | 5606:7c383c5784ed |
---|---|
2709 QUIT; | 2709 QUIT; |
2710 c = readchar (readcharfun); | 2710 c = readchar (readcharfun); |
2711 } | 2711 } |
2712 | 2712 |
2713 Lstream_flush (XLSTREAM (Vread_buffer_stream)); | 2713 Lstream_flush (XLSTREAM (Vread_buffer_stream)); |
2714 /* blasted terminating 0 */ | |
2715 Lstream_put_ichar (XLSTREAM (Vread_buffer_stream), 0); | |
2714 | 2716 |
2715 parsed | 2717 parsed |
2716 = parse_integer (resizing_buffer_stream_ptr | 2718 = parse_integer (resizing_buffer_stream_ptr |
2717 (XLSTREAM (Vread_buffer_stream)), | 2719 (XLSTREAM (Vread_buffer_stream)), |
2718 Lstream_byte_count (XLSTREAM | 2720 Lstream_byte_count (XLSTREAM |
2719 (Vread_buffer_stream)), | 2721 (Vread_buffer_stream)) |
2720 10); | 2722 - 1, 10); |
2721 | 2723 |
2722 found = assoc_no_quit (parsed, Vread_objects); | 2724 found = assoc_no_quit (parsed, Vread_objects); |
2723 if (c == '=') | 2725 if (c == '=') |
2724 { | 2726 { |
2725 /* #n=object returns object, but associates it with | 2727 /* #n=object returns object, but associates it with |