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
/
x_pkey.c
diff --git
a/crypto/asn1/x_pkey.c
b/crypto/asn1/x_pkey.c
index 59e002bd457e18b57a6147fe11ba83ca4efff854..b01616fb8dc79e533c7c8c4f244fc614a9e5a700 100644
(file)
--- a/
crypto/asn1/x_pkey.c
+++ b/
crypto/asn1/x_pkey.c
@@
-66,10
+66,10
@@
X509_PKEY *X509_PKEY_new(void)
{
X509_PKEY *ret = NULL;
- ret = OPENSSL_malloc(sizeof(
X509_PKEY
));
+ ret = OPENSSL_malloc(sizeof(
*ret
));
if (!ret)
goto err;
- memset(ret, 0, sizeof(
X509_PKEY
));
+ memset(ret, 0, sizeof(
*ret
));
ret->version = 0;
ret->enc_algor = X509_ALGOR_new();