NetBSD-Bugs archive

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

bin/50745: src/usr.bin/ftp/cmds.c:1974]: (style) Array index 'i' is used before limits check.



>Number:         50745
>Category:       bin
>Synopsis:       src/usr.bin/ftp/cmds.c:1974]: (style) Array index 'i' 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:30:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160131
>Organization:
>Environment:
>Description:
Source code is

      for (i = 0; *(ntin + i) && i < 16; i++) {

Maybe something like

      for (i = 0; (i < 16) && *(ntin + i); i++) {

might be better.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index