This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/16429] New: strptime truncate 64bit pointer to 32bit


https://sourceware.org/bugzilla/show_bug.cgi?id=16429

            Bug ID: 16429
           Summary: strptime truncate 64bit pointer to 32bit
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: hxnhxn at gmail dot com
                CC: drepper.fsp at gmail dot com

under 64-bit enviroment, when input an 64-bit pointer as arg1 to strptime, e.g,
a char[] array, it will return a pointer with higher 4 bytes set to zero. 
for example:

char timestr[655] = "2011-11-27T23:06:23qi/ning";
struct tm t;
char * ret = strptime(timestr, "%FT%H:%M:%S", &t);
printf("%llx %llx\n", ret, timestr);
printf("%c\n", *ret);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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