NetBSD-Bugs archive

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

bin/50750: src/usr.bin/unexpand/unexpand.c:177]: (style) Array index 'n' is used before limits check.



>Number:         50750
>Category:       bin
>Synopsis:       src/usr.bin/unexpand/unexpand.c:177]: (style) Array index 'n' 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

           for (n = 0; tabstops[n] <= ocol && n < nstops; n++)

Maybe

           for (n = 0; (n < tabstops) && (tabstops[n] <= ocol); n++)

might be better code.


>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index