mirror of https://github.com/openssl/openssl.git
kdf_scrypt_reset(): NULLify freed pointers
Otherwise doublefree happens with further usage. Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/26488)
This commit is contained in:
parent
2dded72022
commit
901b108154
|
@ -92,7 +92,9 @@ static void kdf_scrypt_reset(void *vctx)
|
|||
KDF_SCRYPT *ctx = (KDF_SCRYPT *)vctx;
|
||||
|
||||
OPENSSL_free(ctx->salt);
|
||||
ctx->salt = NULL;
|
||||
OPENSSL_clear_free(ctx->pass, ctx->pass_len);
|
||||
ctx->pass = NULL;
|
||||
kdf_scrypt_init(ctx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue