NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/51001: src/lib/libc/gdtoa/strtodg.c:560: possible off by one error ?
>Number: 51001
>Category: lib
>Synopsis: src/lib/libc/gdtoa/strtodg.c:560: possible off by one error ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 24 12:15:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160324
>Organization:
>Environment:
>Description:
src/lib/libc/gdtoa/strtodg.c:560] -> [src/lib/libc/gdtoa/strtodg.c:556]: (warning) Either the condition 'e<=24' is redundant or the array 'fivesbits[23]' is accessed at index 24, which is out of bounds.
Source code is
if (e <= Ten_pmax) {
#ifdef VAX
goto vax_ovfl_check;
#else
i = fivesbits[e] + mantbits(&rv) <= P;
Maybe the if condition should be
if (e < Ten_pmax) {
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index