Add and use OPENSSL_zalloc
There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -3836,9 +3836,8 @@ int ssl3_new(SSL *s)
|
||||
{
|
||||
SSL3_STATE *s3;
|
||||
|
||||
if ((s3 = OPENSSL_malloc(sizeof(*s3))) == NULL)
|
||||
if ((s3 = OPENSSL_zalloc(sizeof(*s3))) == NULL)
|
||||
goto err;
|
||||
memset(s3, 0, sizeof(*s3));
|
||||
s->s3 = s3;
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
|
Reference in New Issue
Block a user