Module Name: src
Committed By: christos
Date: Sat Feb 27 16:31:31 UTC 2016
Modified Files:
src/usr.bin/ftp: cmds.c
Log Message:
CID 1354295: Array overrun.
To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/usr.bin/ftp/cmds.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.136 src/usr.bin/ftp/cmds.c:1.137
--- src/usr.bin/ftp/cmds.c:1.136 Sat Feb 6 16:23:09 2016
+++ src/usr.bin/ftp/cmds.c Sat Feb 27 11:31:31 2016
@@ -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 @@ dotrans(char *dst, size_t dlen, const ch
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) {