This is the mail archive of the glibc-bugs@sources.redhat.com 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/559] New: %I64d is ignored when prepending it with qualifiers


Just take this small program.

--8<------------------------------------------

#include <stdio.h>

int main(int argc, char **argv)
{
  printf("%15I64d\n", 10);
  return 0;
}

--8<--------------------------------------------

Then compile it using the latest libc (2.3.3). You will see that the %15I64d 
statement is simply ignored (you get %15I64d on your console)... As if you do 
not provide a qualifier (just %I64d), it IS working (even if printf does not 
take care of your qualifier).

Tested on SuSE 9.1 and 9.2.

The problem is that if you have a more complex printf format string (like "%
15I64d: %s" your string argument will be your big integer and you will get a 
beautiful segfault ;-) (nice isn't it ?)

-- 
           Summary: %I64d is ignored when prepending it with qualifiers
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: mfluhr at nero dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=559

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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