Skip to content
Commit 3ff170c6 authored by Diego Santa Cruz's avatar Diego Santa Cruz Committed by Matt Caswell
Browse files

Use memset to clear SRP_CTX instead of NULL and zero assignments



This uses memset() to clear all of the SRP_CTX when free'ing or
initializing it as well as in error paths instead of having a series
of NULL and zero assignments as it is safer.

It also changes SSL_SRP_CTX_init() to reset all the SRP_CTX to zero
in case or error, previously it could retain pointers to freed
memory, potentially leading to a double free.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3467)

(cherry picked from commit 135976b3)
parent 0f2e444e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment