From 896ee758458e7d17dd2014f065480b5085e6be10 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Sun, 25 May 2014 20:28:50 +0000 Subject: calloc instead of malloc/memset. from Benjamin Baier --- src/lib/libcrypto/pkcs7/bio_ber.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/libcrypto/pkcs7') diff --git a/src/lib/libcrypto/pkcs7/bio_ber.c b/src/lib/libcrypto/pkcs7/bio_ber.c index 216d237b4d..fbcbd16abe 100644 --- a/src/lib/libcrypto/pkcs7/bio_ber.c +++ b/src/lib/libcrypto/pkcs7/bio_ber.c @@ -126,11 +126,9 @@ static int ber_new(BIO *bi) { BIO_BER_CTX *ctx; - ctx=(BIO_BER_CTX *)malloc(sizeof(BIO_BER_CTX)); + ctx=calloc(1, sizeof(BIO_BER_CTX)); if (ctx == NULL) return(0); - memset((char *)ctx,0,sizeof(BIO_BER_CTX)); - bi->init=0; bi->ptr=(char *)ctx; bi->flags=0; -- cgit v1.2.3-55-g6feb