summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2001-11-27 14:11:47 +0000
committerume <ume@FreeBSD.org>2001-11-27 14:11:47 +0000
commit8ee8d7c8d6970b575b23f82aaaf20971b506627a (patch)
treeef38c076ab249d72ff27c36266b0e153e4326896 /sys/netinet6
parentab5488a6a1c405cf165b96e55b8beb755a913412 (diff)
downloadFreeBSD-src-8ee8d7c8d6970b575b23f82aaaf20971b506627a.zip
FreeBSD-src-8ee8d7c8d6970b575b23f82aaaf20971b506627a.tar.gz
fixed the cast128 calculation with a short cipher key length.
the memory was overridden when the key length was less than 16 bytes. Obtained from: KAME MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/esp_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c
index f262531..a41bb69 100644
--- a/sys/netinet6/esp_core.c
+++ b/sys/netinet6/esp_core.c
@@ -517,7 +517,8 @@ esp_cast128_schedule(algo, sav)
struct secasvar *sav;
{
- set_cast128_subkey((u_int32_t *)sav->sched, _KEYBUF(sav->key_enc));
+ set_cast128_subkey((u_int32_t *)sav->sched, _KEYBUF(sav->key_enc),
+ _KEYLEN(sav->key_enc));
return 0;
}
OpenPOWER on IntegriCloud