summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-08-21 02:40:33 +0000
committerpfg <pfg@FreeBSD.org>2014-08-21 02:40:33 +0000
commit4f5a56e73cd28662dbe8f81787b0e69ff9e94950 (patch)
tree4246d524af7501e4f9968d21bc586d16a77a75fa /usr.bin
parent5a060fa7839ed3be38abc8f964e12e79ec18cd11 (diff)
downloadFreeBSD-src-4f5a56e73cd28662dbe8f81787b0e69ff9e94950.zip
FreeBSD-src-4f5a56e73cd28662dbe8f81787b0e69ff9e94950.tar.gz
Always check the limits of array index variables before using them.
Obtained from: DragonFlyBSD MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mail/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/mail/edit.c b/usr.bin/mail/edit.c
index ad8aa53..f9e974d 100644
--- a/usr.bin/mail/edit.c
+++ b/usr.bin/mail/edit.c
@@ -81,7 +81,7 @@ edit1(int *msgvec, int type)
/*
* Deal with each message to be edited . . .
*/
- for (i = 0; msgvec[i] && i < msgCount; i++) {
+ for (i = 0; i < msgCount && msgvec[i]; i++) {
sig_t sigint;
if (i > 0) {
OpenPOWER on IntegriCloud