This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/9857] sprintf gives SIGSEGV
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Feb 2009 13:28:34 -0000
- Subject: [Bug libc/9857] sprintf gives SIGSEGV
- References: <20090217130620.9857.alx_me@mail.ru>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2009-02-17 13:28 -------
Correctly is wrong word, as this is clearly undefined behavior, %s argument is
supposed to be a pointer to the initial element of an array of character type,
which NULL is not. And it actually has nothing to do with glibc, because it is
GCC that optimizes the sprintf call into strcpy.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://sourceware.org/bugzilla/show_bug.cgi?id=9857
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.