This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16492] New: sprintf


#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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]