Skip to content

Commit

Permalink
clear key schedule buffer before freeing (oops!)
Browse files Browse the repository at this point in the history
  • Loading branch information
itojun committed Jul 22, 2003
1 parent 7a45f34 commit 26b2a58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kame/sys/netinet6/esp_core.c
@@ -1,4 +1,4 @@
/* $KAME: esp_core.c,v 1.62 2003/07/20 18:01:20 itojun Exp $ */
/* $KAME: esp_core.c,v 1.63 2003/07/22 08:53:18 itojun Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -251,6 +251,7 @@ esp_schedule(algo, sav)
if (error) {
ipseclog((LOG_ERR, "esp_schedule %s: error %d\n",
algo->name, error));
bzero(sav->sched, sav->schedlen);
free(sav->sched, M_SECA);
sav->sched = NULL;
sav->schedlen = 0;
Expand Down
3 changes: 2 additions & 1 deletion kame/sys/netkey/key.c
@@ -1,4 +1,4 @@
/* $KAME: key.c,v 1.296 2003/07/08 22:01:38 itojun Exp $ */
/* $KAME: key.c,v 1.297 2003/07/22 08:53:17 itojun Exp $ */

/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
Expand Down Expand Up @@ -3337,6 +3337,7 @@ key_setsaval(sav, m, mhp)
sav->key_enc = NULL;
}
if (sav->sched) {
bzero(sav->sched, sav->schedlen);
KFREE(sav->sched);
sav->sched = NULL;
}
Expand Down

0 comments on commit 26b2a58

Please sign in to comment.