summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs7
diff options
context:
space:
mode:
authortedu <>2014-05-25 20:28:50 +0000
committertedu <>2014-05-25 20:28:50 +0000
commit7ac48fead6b52013328f67c97481309ffa1e7b59 (patch)
tree7a0bda660a181d082657a078f67d9146fbd212c2 /src/lib/libcrypto/pkcs7
parent8940e52b42d901dc8efea2d945fccb8954f11458 (diff)
downloadopenbsd-7ac48fead6b52013328f67c97481309ffa1e7b59.tar.gz
openbsd-7ac48fead6b52013328f67c97481309ffa1e7b59.tar.bz2
openbsd-7ac48fead6b52013328f67c97481309ffa1e7b59.zip
calloc instead of malloc/memset. from Benjamin Baier
Diffstat (limited to 'src/lib/libcrypto/pkcs7')
-rw-r--r--src/lib/libcrypto/pkcs7/bio_ber.c4
1 files changed, 1 insertions, 3 deletions
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)
126 { 126 {
127 BIO_BER_CTX *ctx; 127 BIO_BER_CTX *ctx;
128 128
129 ctx=(BIO_BER_CTX *)malloc(sizeof(BIO_BER_CTX)); 129 ctx=calloc(1, sizeof(BIO_BER_CTX));
130 if (ctx == NULL) return(0); 130 if (ctx == NULL) return(0);
131 131
132 memset((char *)ctx,0,sizeof(BIO_BER_CTX));
133
134 bi->init=0; 132 bi->init=0;
135 bi->ptr=(char *)ctx; 133 bi->ptr=(char *)ctx;
136 bi->flags=0; 134 bi->flags=0;