Module Name: src
Committed By: christos
Date: Wed Nov 27 20:37:29 UTC 2013
Modified Files:
src/external/bsd/nvi/dist/ip: ip_read.c
Log Message:
CID 1132763: Missing NULL check
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/nvi/dist/ip/ip_read.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/nvi/dist/ip/ip_read.c
diff -u src/external/bsd/nvi/dist/ip/ip_read.c:1.3 src/external/bsd/nvi/dist/ip/ip_read.c:1.4
--- src/external/bsd/nvi/dist/ip/ip_read.c:1.3 Fri Nov 22 14:59:36 2013
+++ src/external/bsd/nvi/dist/ip/ip_read.c Wed Nov 27 15:37:29 2013
@@ -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 @@ err: rval = INP_ERR;
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);