Skip to content

Commit 3eb9fd9

Browse files
committed
Fix: Zero kemContext in wc_HpkeDecap
1 parent d952ef6 commit 3eb9fd9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

wolfcrypt/src/hpke.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,7 @@ static int wc_HpkeDecap(Hpke* hpke, void* receiverKey, const byte* pubKey,
10371037
}
10381038

10391039
ForceZero(dh, hpke->Ndh);
1040+
ForceZero(kemContext, hpke->Npk * 2);
10401041
WC_FREE_VAR_EX(dh, hpke->heap, DYNAMIC_TYPE_TMP_BUFFER);
10411042
WC_FREE_VAR_EX(kemContext, hpke->heap, DYNAMIC_TYPE_TMP_BUFFER);
10421043

0 commit comments

Comments
 (0)