chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix string->number (bug #1272) by checking ear


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix string->number (bug #1272) by checking early for invalid bases
Date: Thu, 31 Mar 2016 22:08:03 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

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 when a base outside the range 2..36 is passed,
because what are even supposed to be the digits in higher bases?

In CHICKEN 5, this has been fixed because we're no longer relying on
broken C functions.  But I'd still advise to apply this patch to
chicken-5, so the NEWS update is listed, and for consistency reasons.
(it applies cleanly to both branches, here)

Cheers,
Peter

Attachment: 0001-Fix-invalid-base-handling-of-string-number.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]