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]
/
engines
/
e_gmp.c
diff --git
a/engines/e_gmp.c
b/engines/e_gmp.c
index cf01016a17dcd40b348c48b5c09e2e037d1e841e..dd72759ebf6b10284f76d93a4ae01a4dad3b728b 100644
(file)
--- a/
engines/e_gmp.c
+++ b/
engines/e_gmp.c
@@
-322,9
+322,10
@@
typedef struct st_e_gmp_rsa_ctx {
static E_GMP_RSA_CTX *e_gmp_get_rsa(RSA *rsa)
{
E_GMP_RSA_CTX *hptr = RSA_get_ex_data(rsa, hndidx_rsa);
+
if (hptr)
return hptr;
- hptr = OPENSSL_malloc(sizeof(
E_GMP_RSA_CTX
));
+ hptr = OPENSSL_malloc(sizeof(
*hptr
));
if (!hptr)
return NULL;
/*