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_lbuf.c
diff --git
a/crypto/bio/bf_lbuf.c
b/crypto/bio/bf_lbuf.c
index d7906b419cfdb66e73f8dfe7812a912aa868699c..e948e924b92eefa5468aa07150c6bd96fa38b369 100644
(file)
--- a/
crypto/bio/bf_lbuf.c
+++ b/
crypto/bio/bf_lbuf.c
@@
-104,7
+104,7
@@
static int linebuffer_new(BIO *bi)
{
BIO_LINEBUFFER_CTX *ctx;
- ctx = OPENSSL_malloc(sizeof(
BIO_LINEBUFFER_CTX
));
+ ctx = OPENSSL_malloc(sizeof(
*ctx
));
if (ctx == NULL)
return (0);
ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);