Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/dist/ipsec-tools/src/racoon From Roman Hoog Antink <r...
details: https://anonhg.NetBSD.org/src/rev/94ef3686ef6e
branches: trunk
changeset: 759669:94ef3686ef6e
user: tteras <tteras%NetBSD.org@localhost>
date: Tue Dec 14 17:57:31 2010 +0000
description:
>From Roman Hoog Antink <rha%open.ch@localhost>: Fix possible null derefence.
diffstat:
crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r b0ab711ea6b9 -r 94ef3686ef6e crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c
--- a/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c Tue Dec 14 17:52:06 2010 +0000
+++ b/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c Tue Dec 14 17:57:31 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_doi.c,v 1.45 2010/10/11 14:16:30 vanhu Exp $ */
+/* $NetBSD: ipsec_doi.c,v 1.46 2010/12/14 17:57:31 tteras Exp $ */
/* Id: ipsec_doi.c,v 1.55 2006/08/17 09:20:41 vanhu Exp */
@@ -4166,9 +4166,14 @@
u_int8_t *prefixlen;
u_int16_t *ul_proto;
{
- struct ipsecdoi_id_b *id_b = (struct ipsecdoi_id_b *)buf->v;
+ struct ipsecdoi_id_b *id_b = NULL;
u_int plen = 0;
+ if (buf == NULL)
+ return ISAKMP_INTERNAL_ERROR;
+
+ id_b = (struct ipsecdoi_id_b *)buf->v;
+
/*
* When a ID payload of subnet type with a IP address of full bit
* masked, it has to be processed as host address.
Home |
Main Index |
Thread Index |
Old Index