This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13138] scanf crashes on very long numbers
- From: "lanurmi at iki dot fi" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 02 Sep 2011 15:07:16 +0000
- Subject: [Bug libc/13138] scanf crashes on very long numbers
- Auto-submitted: auto-generated
- References: <bug-13138-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=13138
--- Comment #2 from Lauri Nurmi <lanurmi at iki dot fi> 2011-09-02 15:07:16 UTC ---
Good news everyone:
ISO C99 Â7.19.6.2 item 10 says:
"[...] the result of the conversion is placed in the object pointed to by
[...]. If this object does not have an appropriate type, or if the result of
the conversion cannot be represented in the object, the behavior is undefined."
So the standard permits the crash; problem solved.
I'll leave this bug open though, so that alternatives to segfaulting can be
considered.
--
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.