Use safer sizeof variant in malloc
[openssl.git] / crypto / evp / bio_b64.c
index fe772fc34fcf4b11380edb1b2ca52429ad94f79a..6dc3bb10ce20f7687c031ec0e0f8cfe4949101b6 100644 (file)
@@ -115,7 +115,7 @@ static int b64_new(BIO *bi)
 {
     BIO_B64_CTX *ctx;
 
-    ctx = OPENSSL_malloc(sizeof(BIO_B64_CTX));
+    ctx = OPENSSL_malloc(sizeof(*ctx));
     if (ctx == NULL)
         return (0);