Module Name: src Committed By: tteras Date: Tue Dec 14 17:57:32 UTC 2010
Modified Files: src/crypto/dist/ipsec-tools/src/racoon: ipsec_doi.c Log Message: >From Roman Hoog Antink <r...@open.ch>: Fix possible null derefence. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c diff -u src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c:1.45 src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c:1.46 --- src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c:1.45 Mon Oct 11 14:16:30 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/ipsec_doi.c Tue Dec 14 17:57:31 2010 @@ -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.