summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-07-01 19:09:40 +0000
committerjoerg <joerg@FreeBSD.org>1995-07-01 19:09:40 +0000
commit579762e798a64053a3dfdb2a7e0a8389e7289d3f (patch)
tree44275f3ea15c8cd817360a61973189323cc08ec8 /sys
parentabfd59ab81c4c9192c3b07735c6b935d5df7eb9f (diff)
downloadFreeBSD-src-579762e798a64053a3dfdb2a7e0a8389e7289d3f.zip
FreeBSD-src-579762e798a64053a3dfdb2a7e0a8389e7289d3f.tar.gz
I saw a very low-key commit message on the netbsd mailing lists and
figured out what the problem was.. Anyway, I rate it as "highly serious". Submitted by: peter@haywire.DIALix.COM (Peter Wemm)
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 45c21cc..a77ed02 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $Id: ip_output.c,v 1.18 1995/05/09 13:35:46 davidg Exp $
+ * $Id: ip_output.c,v 1.20 1995/06/13 17:51:14 wollman Exp $
*/
#include <sys/param.h>
@@ -554,7 +554,9 @@ ip_ctloutput(op, so, level, optname, mp)
case IP_RECVOPTS:
case IP_RECVRETOPTS:
case IP_RECVDSTADDR:
- if (m->m_len != sizeof(int))
+ if (m == 0)
+ error = EFAULT;
+ else if (m->m_len != sizeof(int))
error = EINVAL;
else {
optval = *mtod(m, int *);
OpenPOWER on IntegriCloud