This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12667] fscanf silently converts signed to unsigned
- From: "alexander.enchevich at yahoo dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 12 Apr 2011 13:37:13 +0000
- Subject: [Bug libc/12667] fscanf silently converts signed to unsigned
- Auto-submitted: auto-generated
- References: <bug-12667-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12667
--- Comment #3 from Alexander Enchevich <alexander.enchevich at yahoo dot com> 2011-04-12 13:37:12 UTC ---
The comment about errno actually relates to the problem with big numbers
(bigger than MAXINT), so the last 2 paragraphs should be switched:
>
> Also, attempting to scan a number bigger than MAXINT (signed and unsigned),
> e.g. 6666666666 silently returns 0xFFFFFFFF as the scanned integer, which is
> also a bug. (I can file a separate report for it if it is preferable?)
>
> Interestingly, at the same time errno is set to 34 (Numerical result outside of
> range) so some code inside the lib does have some idea that something went
> wrong. This is yet another proof that this is a bug - you can't have errno set
> if everything is had supposedly worked fine.
Sorry about this..
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.