fixed delsainfo() to avoid a crash when iddst's value is SAINFO_CLIENTADDR

This commit is contained in:
vanhu 2008-11-06 14:12:28 +00:00
parent 531d468612
commit 33dafe234f
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2008-11-06 Yvan Vanhullebus <vanhu@netasq.com>
* src/racoon/sainfo.c: fixed delsainfo() to avoid a crash when
iddst's value is SAINFO_CLIENTADDR.
2008-10-29 S.P.Zeidler <spz@serpens.de>
* src/racoon/ipsec_doi.c: Use sockaddr_storage to prevent
stack overflow. Initialize scope id for non-linklocal addresses.

View File

@ -1,4 +1,4 @@
/* $NetBSD: sainfo.c,v 1.10 2007/09/12 23:39:51 mgrooms Exp $ */
/* $NetBSD: sainfo.c,v 1.11 2008/11/06 14:12:28 vanhu Exp $ */
/* $KAME: sainfo.c,v 1.16 2003/06/27 07:32:39 sakane Exp $ */
@ -209,7 +209,8 @@ delsainfo(si)
if (si->idsrc)
vfree(si->idsrc);
if (si->iddst)
if (si->iddst != NULL &&
si->iddst != SAINFO_CLIENTADDR)
vfree(si->iddst);
#ifdef ENABLE_HYBRID