projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Android build: fix usage of NDK home variable ($ndk_var)
[openssl.git]
/
crypto
/
bio
/
bf_lbuf.c
diff --git
a/crypto/bio/bf_lbuf.c
b/crypto/bio/bf_lbuf.c
index 2a4d1e698b13c0c5eee21624272d829d6dd0a693..194c7b8af7137fe745a81831d15e96a706587ffd 100644
(file)
--- a/
crypto/bio/bf_lbuf.c
+++ b/
crypto/bio/bf_lbuf.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 1995-201
6
The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-201
8
The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@
-59,11
+59,13
@@
static int linebuffer_new(BIO *bi)
{
BIO_LINEBUFFER_CTX *ctx;
{
BIO_LINEBUFFER_CTX *ctx;
- ctx = OPENSSL_malloc(sizeof(*ctx));
- if (ctx == NULL)
+ if ((ctx = OPENSSL_malloc(sizeof(*ctx))) == NULL) {
+ BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE);
return 0;
return 0;
+ }
ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);
if (ctx->obuf == NULL) {
ctx->obuf = OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);
if (ctx->obuf == NULL) {
+ BIOerr(BIO_F_LINEBUFFER_NEW, ERR_R_MALLOC_FAILURE);
OPENSSL_free(ctx);
return 0;
}
OPENSSL_free(ctx);
return 0;
}