diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-04-18 19:21:46 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-04-18 19:21:46 +0200 |
commit | 206895afae413df9a3961ce6793ce295babb5920 (patch) | |
tree | 0b16a8466e9f0f054176ecfb2fa24a6b942fcec6 /drivers/builtin_openssl2/crypto/bio/bss_mem.c | |
parent | 336cbfa7b63721757874f0fc5c33ec5dd31c5076 (diff) | |
parent | e97922f22038e9049ed4c2db5b3736dfaa0edde3 (diff) |
Merge pull request #4329 from mrezai/openssl-1.0.2g
Update OpenSSL to version 1.0.2g
Diffstat (limited to 'drivers/builtin_openssl2/crypto/bio/bss_mem.c')
-rw-r--r-- | drivers/builtin_openssl2/crypto/bio/bss_mem.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/builtin_openssl2/crypto/bio/bss_mem.c b/drivers/builtin_openssl2/crypto/bio/bss_mem.c index d190765dc2..b0394a960d 100644 --- a/drivers/builtin_openssl2/crypto/bio/bss_mem.c +++ b/drivers/builtin_openssl2/crypto/bio/bss_mem.c @@ -91,7 +91,8 @@ BIO_METHOD *BIO_s_mem(void) return (&mem_method); } -BIO *BIO_new_mem_buf(void *buf, int len) + +BIO *BIO_new_mem_buf(const void *buf, int len) { BIO *ret; BUF_MEM *b; @@ -105,7 +106,8 @@ BIO *BIO_new_mem_buf(void *buf, int len) if (!(ret = BIO_new(BIO_s_mem()))) return NULL; b = (BUF_MEM *)ret->ptr; - b->data = buf; + /* Cast away const and trust in the MEM_RDONLY flag. */ + b->data = (void *)buf; b->length = sz; b->max = sz; ret->flags |= BIO_FLAGS_MEM_RDONLY; |