Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/mail avoid longjmp clobber.



details:   https://anonhg.NetBSD.org/src/rev/3fd1d0798360
branches:  trunk
changeset: 790633:3fd1d0798360
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 18 20:17:59 2013 +0000

description:
avoid longjmp clobber.

diffstat:

 usr.bin/mail/cmd1.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (43 lines):

diff -r 3042145a613d -r 3fd1d0798360 usr.bin/mail/cmd1.c
--- a/usr.bin/mail/cmd1.c       Fri Oct 18 19:58:11 2013 +0000
+++ b/usr.bin/mail/cmd1.c       Fri Oct 18 20:17:59 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmd1.c,v 1.33 2012/06/12 19:03:26 christos Exp $       */
+/*     $NetBSD: cmd1.c,v 1.34 2013/10/18 20:17:59 christos Exp $       */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)cmd1.c     8.2 (Berkeley) 4/20/95";
 #else
-__RCSID("$NetBSD: cmd1.c,v 1.33 2012/06/12 19:03:26 christos Exp $");
+__RCSID("$NetBSD: cmd1.c,v 1.34 2013/10/18 20:17:59 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -325,6 +325,7 @@
         * not what it is pointing at!
         */
        FILE *volatile obuf;            /* avoid longjmp clobbering */
+       int * volatile mvec;
        sig_t volatile oldsigpipe;      /* avoid longjmp clobbering? */
 #ifdef MIME_SUPPORT
        struct mime_info *volatile mip; /* avoid longjmp clobbering? */
@@ -332,6 +333,7 @@
        mip = NULL;
 #endif
 
+       mvec = msgvec;
        if ((obuf = last_registered_file(0)) == NULL)
                obuf = stdout;
 
@@ -348,7 +350,7 @@
        msgCount = get_msgCount();
 
        recursive = do_recursion();
-       for (ip = msgvec; *ip && ip - msgvec < msgCount; ip++) {
+       for (ip = mvec; *ip && ip - mvec < msgCount; ip++) {
                struct type1_core_args_s args;
                struct message *mp;
 



Home | Main Index | Thread Index | Old Index