Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/ftp CID 1354295: Array overrun.



details:   https://anonhg.NetBSD.org/src/rev/4bf9d35509cc
branches:  trunk
changeset: 343804:4bf9d35509cc
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 27 16:31:31 2016 +0000

description:
CID 1354295: Array overrun.

diffstat:

 usr.bin/ftp/cmds.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 925715b510c7 -r 4bf9d35509cc usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c        Sat Feb 27 16:28:50 2016 +0000
+++ b/usr.bin/ftp/cmds.c        Sat Feb 27 16:31:31 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmds.c,v 1.136 2016/02/06 21:23:09 christos Exp $      */
+/*     $NetBSD: cmds.c,v 1.137 2016/02/27 16:31:31 christos Exp $      */
 
 /*-
  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.136 2016/02/06 21:23:09 christos Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.137 2016/02/27 16:31:31 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -1971,7 +1971,7 @@
                continue;
        for (cp1 = src; *cp1; cp1++) {
                int found = 0;
-               for (i = 0; ntin[i] && i < sizeof(ntin); i++) {
+               for (i = 0; i < sizeof(ntin) && ntin[i]; i++) {
                        if (*cp1 == ntin[i]) {
                                found++;
                                if (i < ostop) {



Home | Main Index | Thread Index | Old Index