diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-12-18 16:45:33 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-12-18 16:45:33 +0000 |
commit | 1b63de84b37f25e71a6cc165c122ca385b646a72 (patch) | |
tree | a2b2b49b0e73465f73fb32148248b54b24d2b2ca /sys | |
parent | e7748204231ab6276d03fd7fafefa2b760bdbcaf (diff) |
Minor sanity check.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index ed7be168d5b..cf926af0fac 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.102 2000/12/15 06:24:03 provos Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.103 2000/12/18 16:45:32 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -332,6 +332,10 @@ gettdbbyaddr(union sockaddr_union *dst, u_int8_t proto, struct mbuf *m, int af) (tdbp->tdb_dstid_type != SADB_IDENTTYPE_CONNECTION))) continue; + /* Sanity */ + if ((m == NULL) || (af == 0)) + continue; + /* XXX Check the IDs ? */ break; } |