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/ip CID 1132763: Missing NULL check



details:   https://anonhg.NetBSD.org/src/rev/7c9cf6277b14
branches:  trunk
changeset: 791667:7c9cf6277b14
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Nov 27 20:37:29 2013 +0000

description:
CID 1132763: Missing NULL check

diffstat:

 external/bsd/nvi/dist/ip/ip_read.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 381f1cc9ce35 -r 7c9cf6277b14 external/bsd/nvi/dist/ip/ip_read.c
--- a/external/bsd/nvi/dist/ip/ip_read.c        Wed Nov 27 20:34:34 2013 +0000
+++ b/external/bsd/nvi/dist/ip/ip_read.c        Wed Nov 27 20:37:29 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_read.c,v 1.3 2013/11/22 19:59:36 martin Exp $       */
+/*     $NetBSD: ip_read.c,v 1.4 2013/11/27 20:37:29 christos Exp $     */
 /*-
  * Copyright (c) 1996
  *     Keith Bostic.  All rights reserved.
@@ -272,6 +272,12 @@
                msgq(sp, M_SYSERR, "input");
                break;
        default:                                /* Input characters. */
+               if (sp == NULL) {
+                       rval = INP_ERR;
+                       msgq(sp, M_SYSERR,
+                           "Can't convert input with NULL screen");
+                       break;
+               }
                if (!termread) ipp->iblen += *nr;
                else {
                        CHAR2INT(sp, (char *)ipp->tbuf, *nr, wp, wlen);



Home | Main Index | Thread Index | Old Index