bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in libiberty strtod.c


From: Stuart Griffith
Subject: Bug in libiberty strtod.c
Date: Mon, 11 Mar 2002 13:20:24 -0800

Just a note to let you know that the source for strtod that has been
distributed as part of libiberty for the Cygnus 99r1 and 00r1 releases
contains an error. In the code that checks for an input string of "inf"
or "infinity" when "infinity" is found the pointer into the string is
advanced by 7. This should be 8. (In the copy of the sources I have this
is line 62.)

Stuart Griffith
Sr. Software Engineer
IMS, A Credence Company.



*** strtod.c.orig
--- strtod.c
***************
*** 59,65 ****
          && (p[6] == 't' || p[6] == 'T')
          && (p[7] == 'y' || p[7] == 'Y'))
        {
!         *ptr = p + 7;
          return atof (str);
        }
        else
--- 59,65 ----
          && (p[6] == 't' || p[6] == 'T')
          && (p[7] == 'y' || p[7] == 'Y'))
        {
!         *ptr = p + 8;
          return atof (str);
        }
        else





reply via email to

[Prev in Thread] Current Thread [Next in Thread]