projects
/
oweals
/
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
[oweals/openssl.git]
/
crypto
/
bio
/
bf_buff.c
diff --git
a/crypto/bio/bf_buff.c
b/crypto/bio/bf_buff.c
index 53a120465a712da67290b76784038ac08287df78..6487f437d59ac8eac2db67a199d417fd01ceace8 100644
(file)
--- a/
crypto/bio/bf_buff.c
+++ b/
crypto/bio/bf_buff.c
@@
-91,9
+91,8
@@
BIO_METHOD *BIO_f_buffer(void)
static int buffer_new(BIO *bi)
{
- BIO_F_BUFFER_CTX *ctx;
+ BIO_F_BUFFER_CTX *ctx
= OPENSSL_malloc(sizeof(*ctx))
;
- ctx = OPENSSL_malloc(sizeof(BIO_F_BUFFER_CTX));
if (ctx == NULL)
return (0);
ctx->ibuf = OPENSSL_malloc(DEFAULT_BUFFER_SIZE);