Clear BN-mont values when free'ing it.
From a CloudFlare patch.
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 1a586b3942
)
This commit is contained in:

committed by
Rich Salz

parent
5030cc69ff
commit
1a9a506cfb
@@ -361,9 +361,9 @@ void BN_MONT_CTX_free(BN_MONT_CTX *mont)
|
|||||||
if (mont == NULL)
|
if (mont == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
BN_free(&(mont->RR));
|
BN_clear_free(&(mont->RR));
|
||||||
BN_free(&(mont->N));
|
BN_clear_free(&(mont->N));
|
||||||
BN_free(&(mont->Ni));
|
BN_clear_free(&(mont->Ni));
|
||||||
if (mont->flags & BN_FLG_MALLOCED)
|
if (mont->flags & BN_FLG_MALLOCED)
|
||||||
OPENSSL_free(mont);
|
OPENSSL_free(mont);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user