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/958] New: strtoll is broken (truncates to 32 bits)


strtoll is supposed to convert a string to a long long int, but instead it
truncates the parsed value to a long int. I have looked at
libc/sysdeps/generic/strtol_l.c, v1.7 (where strtoll is eventually defined by
aliases) and it appears that on line 380 where the temp variable "j" is defined,
it's defined as "unsigned long int". From reading the code it appears that it
should be defined as "unsigned LONG int", as LONG is aliased to the correct
length. I would provide a patch, but I can't get libc to build from CVS sources
and so I can't verify that that is the problem.

-- 
           Summary: strtoll is broken (truncates to 32 bits)
           Product: glibc
           Version: 2.3.5
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: bugs at chen-becker dot org
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

------- 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]