summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_mem.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/bio/bss_mem.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2
openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing libssl had more reacharounds into this. ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/bio/bss_mem.c')
-rw-r--r--src/lib/libcrypto/bio/bss_mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bio/bss_mem.c b/src/lib/libcrypto/bio/bss_mem.c
index 119bd672f6..be491ca152 100644
--- a/src/lib/libcrypto/bio/bss_mem.c
+++ b/src/lib/libcrypto/bio/bss_mem.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bss_mem.c,v 1.14 2015/03/21 08:05:20 doug Exp $ */ 1/* $OpenBSD: bss_mem.c,v 1.15 2017/01/29 17:49:22 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -101,7 +101,7 @@ BIO_new_mem_buf(void *buf, int len)
101 size_t sz; 101 size_t sz;
102 102
103 if (!buf) { 103 if (!buf) {
104 BIOerr(BIO_F_BIO_NEW_MEM_BUF, BIO_R_NULL_PARAMETER); 104 BIOerror(BIO_R_NULL_PARAMETER);
105 return NULL; 105 return NULL;
106 } 106 }
107 sz = (len < 0) ? strlen(buf) : (size_t)len; 107 sz = (len < 0) ? strlen(buf) : (size_t)len;
@@ -183,12 +183,12 @@ mem_write(BIO *b, const char *in, int inl)
183 183
184 bm = (BUF_MEM *)b->ptr; 184 bm = (BUF_MEM *)b->ptr;
185 if (in == NULL) { 185 if (in == NULL) {
186 BIOerr(BIO_F_MEM_WRITE, BIO_R_NULL_PARAMETER); 186 BIOerror(BIO_R_NULL_PARAMETER);
187 goto end; 187 goto end;
188 } 188 }
189 189
190 if (b->flags & BIO_FLAGS_MEM_RDONLY) { 190 if (b->flags & BIO_FLAGS_MEM_RDONLY) {
191 BIOerr(BIO_F_MEM_WRITE, BIO_R_WRITE_TO_READ_ONLY_BIO); 191 BIOerror(BIO_R_WRITE_TO_READ_ONLY_BIO);
192 goto end; 192 goto end;
193 } 193 }
194 194