NetBSD-Bugs archive

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

bin/50751: [src/usr.sbin/syslogd/tls.c:1594]: (style) Array index 'offset' is used before limits check.



>Number:         50751
>Category:       bin
>Synopsis:       [src/usr.sbin/syslogd/tls.c:1594]: (style) Array index 'offset' is used before limits check.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 02 10:45:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160131
>Organization:
>Environment:
>Description:
Source code is


    while (isdigit((unsigned char)c->inbuf[offset])
        && offset < c->read_pos) {

Maybe

    while ((offset < c->read_pos)
        && isdigit((unsigned char)c->inbuf[offset])) {
       
 
might be better code.


>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index