This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

ecvt is completly broken



Hello,

ecvt/ecvt_r and I think the similar functions are completly broken
if the ndigits parameter is greater then DBL_DIG (15).

- We give only back an string with the max. length of 16. This
  is to short if ndigits is 17 or greater.
- There is a buffer overrun. for ndigits > 19 I get an coredump
- ecvt doesn't round correct.

I think this are 2 bugs, the buffer bug is a problem of ecvt, the
other seems to me a problem of sprintf. Since I doesn't understand
sprintf in the moment, I have no patch for it.

  Thorsten

-- 
Thorsten Kukuk      http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE GmbH           Schanzaeckerstr. 10             90443 Nuernberg
Linux is like a Vorlon.  It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.

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