summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_ah_new.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-02-25 20:14:42 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-02-25 20:14:42 +0000
commit50edc37aaa84525b9d2a9c08b9e9d169e9af8c61 (patch)
tree040f18d6ec04ac15bede36d2bf6d121afc84b4ab /sys/netinet/ip_ah_new.c
parent31429ad66f5aed553b995e129ba6a90060e149c0 (diff)
Bzero key information before free'ing it, just for paranoia's sake.
Diffstat (limited to 'sys/netinet/ip_ah_new.c')
-rw-r--r--sys/netinet/ip_ah_new.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/netinet/ip_ah_new.c b/sys/netinet/ip_ah_new.c
index 5ebfbe47c13..cdb781deb56 100644
--- a/sys/netinet/ip_ah_new.c
+++ b/sys/netinet/ip_ah_new.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah_new.c,v 1.23 1999/02/24 23:45:47 angelos Exp $ */
+/* $OpenBSD: ip_ah_new.c,v 1.24 1999/02/25 20:14:36 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -181,12 +181,18 @@ ah_new_zeroize(struct tdb *tdbp)
{
if (tdbp->tdb_ictx)
{
+ if (tdbp->tdb_authalgxform)
+ bzero(tdbp->tdb_ictx, tdbp->tdb_authalgxform->ctxsize);
+
FREE(tdbp->tdb_ictx, M_XDATA);
tdbp->tdb_ictx = NULL;
}
if (tdbp->tdb_octx)
{
+ if (tdbp->tdb_authalgxform)
+ bzero(tdbp->tdb_octx, tdbp->tdb_authalgxform->ctxsize);
+
FREE(tdbp->tdb_octx, M_XDATA);
tdbp->tdb_octx = NULL;
}