fix buffer overrun reading partial numbers: 1.0f, 1.0/, and 1.0+
authorAndy Wingo <wingo@pobox.com>
Tue, 4 Aug 2009 18:29:09 +0000 (20:29 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 4 Aug 2009 18:29:09 +0000 (20:29 +0200)
commitee0ddd21211757664092eaec631c4c76f4aae74f
tree58064038cd5b3388a6748fd273230d2ec065696d
parenta876e7dcea78e770bedba40017fbb225cf88bff5
fix buffer overrun reading partial numbers: 1.0f, 1.0/, and 1.0+

* libguile/numbers.c (mem2decimal_from_point, mem2ureal, mem2complex):
  Fix a number of cases where, for invalid numbers, we could read past
  the end of the buffer. This happened in e.g. "1.0+", "1/" and "1.0f".
  But I couldn't figure out how to test for these, given that the
  behavior depended on the contents of uninitialized memory in the
  reader buffer. We'll just have to be happy with this.

Thanks to Kjetil S. Matheussen for the report.
libguile/numbers.c