This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16492] New: sprintf
- From: "aotto1968 at onlinehome dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2004 12:08:44 -0000
- Subject: [Bug c/16492] New: sprintf
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
#include <stdio.h>
int main (void)
{
char str[11];
snprintf(str, 10, "%10p", 0x12345678);
str[10] = '\0';
printf("%s\n", str);
}
>> OUTPUT: 0x1234567
>> SHOULD: 0x12345678
--
Summary: sprintf
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aotto1968 at onlinehome dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-suse-linux
GCC host triplet: i586-suse-linux
GCC target triplet: i586-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16492