summaryrefslogtreecommitdiffstats
path: root/src/crypto/buf/buf.c
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2015-09-25 00:37:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 00:37:00 +0000
commit00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872 (patch)
treedc62c249d595198e0d99e43890019d21e901fbec /src/crypto/buf/buf.c
parent3781a60670f92c3c6fca860cb4589495cefa2e56 (diff)
parenta04d78d392463df4e69a64360c952ffa5abd22f7 (diff)
downloadexternal_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.zip
external_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.tar.gz
external_boringssl-00bc53f6f4436972b7a8dcf2c1e5fd0ad7515872.tar.bz2
am a04d78d3: Revert "external/boringssl: sync with upstream."
* commit 'a04d78d392463df4e69a64360c952ffa5abd22f7': Revert "external/boringssl: sync with upstream."
Diffstat (limited to 'src/crypto/buf/buf.c')
-rw-r--r--src/crypto/buf/buf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/crypto/buf/buf.c b/src/crypto/buf/buf.c
index 13b5ceb..5769e77 100644
--- a/src/crypto/buf/buf.c
+++ b/src/crypto/buf/buf.c
@@ -67,7 +67,7 @@ BUF_MEM *BUF_MEM_new(void) {
ret = OPENSSL_malloc(sizeof(BUF_MEM));
if (ret == NULL) {
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, BUF_MEM_new, ERR_R_MALLOC_FAILURE);
return NULL;
}
@@ -105,14 +105,14 @@ static size_t buf_mem_grow(BUF_MEM *buf, size_t len, char clean) {
n = len + 3;
if (n < len) {
/* overflow */
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, buf_mem_grow, ERR_R_MALLOC_FAILURE);
return 0;
}
n = n / 3;
alloc_size = n * 4;
if (alloc_size / 4 != n) {
/* overflow */
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, buf_mem_grow, ERR_R_MALLOC_FAILURE);
return 0;
}
@@ -127,7 +127,7 @@ static size_t buf_mem_grow(BUF_MEM *buf, size_t len, char clean) {
}
if (new_buf == NULL) {
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, buf_mem_grow, ERR_R_MALLOC_FAILURE);
len = 0;
} else {
buf->data = new_buf;
@@ -180,12 +180,12 @@ char *BUF_strndup(const char *buf, size_t size) {
alloc_size = size + 1;
if (alloc_size < size) {
/* overflow */
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, BUF_strndup, ERR_R_MALLOC_FAILURE);
return NULL;
}
ret = OPENSSL_malloc(alloc_size);
if (ret == NULL) {
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, BUF_strndup, ERR_R_MALLOC_FAILURE);
return NULL;
}
@@ -226,7 +226,7 @@ void *BUF_memdup(const void *data, size_t dst_size) {
ret = OPENSSL_malloc(dst_size);
if (ret == NULL) {
- OPENSSL_PUT_ERROR(BUF, ERR_R_MALLOC_FAILURE);
+ OPENSSL_PUT_ERROR(BUF, BUF_memdup, ERR_R_MALLOC_FAILURE);
return NULL;
}