Re: [Chicken-hackers] [PATCH] Fix string->number (bug #1272) by checking early for invalid bases

2016-03-31 Thread John Cowan
Peter Bex scripsit: > See #1272 for more info. I think the best solution is to check the > argument and barf when a base outside the range 2..36 is passed, > because what are even supposed to be the digits in higher bases? Indeed, R5RS and R7RS only require bases 2, 8, 10, and 16 to work. Everyt

[Chicken-hackers] [PATCH] Fix string->number (bug #1272) by checking early for invalid bases

2016-03-31 Thread Peter Bex
Hi all, Attached is a patch to fix the occasional(!) segfault that happens when calling string->number with weird bases. For example, (string->number "123" 60) will sometimess crash with a segfault on glibc. See #1272 for more info. I think the best solution is to check the argument and barf wh