Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/nvi/dist/ex avoid NULL deref.



details:   https://anonhg.NetBSD.org/src/rev/86f5164156d6
branches:  trunk
changeset: 791627:86f5164156d6
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Nov 26 16:32:04 2013 +0000

description:
avoid NULL deref.

diffstat:

 external/bsd/nvi/dist/ex/ex_print.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 67c882c257f9 -r 86f5164156d6 external/bsd/nvi/dist/ex/ex_print.c
--- a/external/bsd/nvi/dist/ex/ex_print.c       Tue Nov 26 13:44:41 2013 +0000
+++ b/external/bsd/nvi/dist/ex/ex_print.c       Tue Nov 26 16:32:04 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ex_print.c,v 1.2 2013/11/22 15:52:05 christos Exp $ */
+/*     $NetBSD: ex_print.c,v 1.3 2013/11/26 16:32:04 christos Exp $ */
 /*-
  * Copyright (c) 1992, 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -332,7 +332,7 @@
 
        exp = EXP(sp);
 
-       if (exp->obp_len != 0) {
+       if (exp && exp->obp_len != 0) {
                sp->wp->scr_msg(sp, M_NONE, exp->obp, exp->obp_len);
                exp->obp_len = 0;
        }



Home | Main Index | Thread Index | Old Index