Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/mail PR/50746: David Binderman: Check bounds before ...



details:   https://anonhg.NetBSD.org/src/rev/5ecc435bd1e3
branches:  trunk
changeset: 343422:5ecc435bd1e3
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Feb 03 05:18:58 2016 +0000

description:
PR/50746: David Binderman: Check bounds before dereferencing.

diffstat:

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

diffs (27 lines):

diff -r e8727b7dae3f -r 5ecc435bd1e3 usr.bin/mail/edit.c
--- a/usr.bin/mail/edit.c       Wed Feb 03 03:26:02 2016 +0000
+++ b/usr.bin/mail/edit.c       Wed Feb 03 05:18:58 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: edit.c,v 1.27 2012/04/29 23:50:22 christos Exp $       */
+/*     $NetBSD: edit.c,v 1.28 2016/02/03 05:18:58 christos Exp $       */
 
 /*
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)edit.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: edit.c,v 1.27 2012/04/29 23:50:22 christos Exp $");
+__RCSID("$NetBSD: edit.c,v 1.28 2016/02/03 05:18:58 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -163,7 +163,7 @@
         * Deal with each message to be edited . . .
         */
        msgCount = get_msgCount();
-       for (i = 0; msgvec[i] && i < msgCount; i++) {
+       for (i = 0; i < msgCount && msgvec[i]; i++) {
                sigset_t oset;
                struct sigaction osa;
 



Home | Main Index | Thread Index | Old Index