summaryrefslogtreecommitdiff
path: root/sys/compat/svr4
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_stream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c
index 48dbf16797c..c79643ec1d9 100644
--- a/sys/compat/svr4/svr4_stream.c
+++ b/sys/compat/svr4/svr4_stream.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_stream.c,v 1.17 2002/03/14 01:26:51 millert Exp $ */
+/* $OpenBSD: svr4_stream.c,v 1.18 2003/11/23 17:14:21 avsm Exp $ */
/* $NetBSD: svr4_stream.c,v 1.19 1996/12/22 23:00:03 fvdl Exp $ */
/*
@@ -153,6 +153,9 @@ show_ioc(str, ioc)
if (len > 1024)
len = 1024;
+ if (len <= 0)
+ return 0;
+
ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK);
uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ",
str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf);