projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use safer sizeof variant in malloc
[openssl.git]
/
crypto
/
asn1
/
bio_asn1.c
diff --git
a/crypto/asn1/bio_asn1.c
b/crypto/asn1/bio_asn1.c
index ba390693742a0b00a6df88dd5466b9895dfe6217..910d06f04dc9a698f722091a94c534ee9b72c7e4 100644
(file)
--- a/
crypto/asn1/bio_asn1.c
+++ b/
crypto/asn1/bio_asn1.c
@@
-146,7
+146,7
@@
BIO_METHOD *BIO_f_asn1(void)
static int asn1_bio_new(BIO *b)
{
BIO_ASN1_BUF_CTX *ctx;
- ctx = OPENSSL_malloc(sizeof(
BIO_ASN1_BUF_CTX
));
+ ctx = OPENSSL_malloc(sizeof(
*ctx
));
if (!ctx)
return 0;
if (!asn1_bio_init(ctx, DEFAULT_ASN1_BUF_SIZE)) {