summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2004-08-17 14:48:24 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2004-08-17 14:48:24 +0000
commit74da1cca5790f08d58e696596b0857d3ab3c7aa3 (patch)
tree1299a610b57ab70286d5de7b8aa6e4e84f2f0c3a /sbin/isakmpd
parentd1807b77667fc347b1b7a91441ea80a8e3799358 (diff)
check for msg->isakmpg_sa being NULL before referencing
ok ho@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/message.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/isakmpd/message.c b/sbin/isakmpd/message.c
index 4b99e400004..8ab01fe5fa5 100644
--- a/sbin/isakmpd/message.c
+++ b/sbin/isakmpd/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.87 2004/08/10 15:59:10 ho Exp $ */
+/* $OpenBSD: message.c,v 1.88 2004/08/17 14:48:23 hshoexer Exp $ */
/* $EOM: message.c,v 1.156 2000/10/10 12:36:39 provos Exp $ */
/*
@@ -892,6 +892,7 @@ message_validate_notify(struct message *msg, struct payload *p)
/* Validate the SPI. XXX Just ISAKMP for now. */
if (proto == ISAKMP_PROTO_ISAKMP &&
GET_ISAKMP_NOTIFY_SPI_SZ(p->p) == ISAKMP_HDR_COOKIES_LEN &&
+ msg->isakmp_sa &&
memcmp(p->p + ISAKMP_NOTIFY_SPI_OFF, msg->isakmp_sa->cookies,
ISAKMP_HDR_COOKIES_LEN) != 0) {
log_print("message_validate_notify: bad cookies");