NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/50747: src/bin/ksh/vi.c: 4 * off by one error ?
>Number: 50747
>Category: bin
>Synopsis: src/bin/ksh/vi.c: 4 * off by one error ?
>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:35:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160131
>Organization:
>Environment:
>Description:
1.
Source code is
while (!is_wordch(es->cbuf[ncursor]) &&
!isspace((unsigned char)es->cbuf[ncursor]) &&
ncursor < es->linelen)
2.
[src/bin/ksh/vi.c:1583]: (style) Array index 'ncursor' is used before limits check.
3.
[src/bin/ksh/vi.c:1650]: (style) Array index 'ncursor' is used before limits check.
Source code is
while (!isspace((unsigned char)es->cbuf[ncursor]) && ncursor < es->linelen)
ncursor++;
4.
[src/bin/ksh/vi.c:1652]: (style) Array index 'ncursor' is used before limits check.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index