|
Message-ID: <20120313150531.GS184@brightrain.aerifal.cx> Date: Tue, 13 Mar 2012 11:05:31 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: scanf %x bug On Tue, Mar 13, 2012 at 02:51:18PM +0100, Szabolcs Nagy wrote: > i found a scanf bug: > > #include <stdio.h> > int main(){ > int n, a=7; > n = sscanf("0", "%x", &a); > printf("%d %d\n", n, a); > return 0; > } > > prints 0 7 > instead of 1 0 Bleh, musl's scanf is really bad but I don't feel like rewriting it... Maybe I'll see if I can do that at the same time I replace the strtod code (which scanf will need to use). In the mean time I'll see if there's a fix for this specific issue. Have you found the corner case that triggers it? Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.