From d34bce03acc53c583df954bbed65d4800751563a Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 3 Apr 2019 19:07:00 +0200 Subject: Add testing of RDONLY memory BIOs Reviewed-by: Bernd Edlinger Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/8649) --- crypto/bio/bss_mem.c | 1 + 1 file changed, 1 insertion(+) (limited to 'crypto/bio') diff --git a/crypto/bio/bss_mem.c b/crypto/bio/bss_mem.c index 51fae3b2f0..a7f2bfbae0 100644 --- a/crypto/bio/bss_mem.c +++ b/crypto/bio/bss_mem.c @@ -204,6 +204,7 @@ static int mem_read(BIO *b, char *out, int outl) if ((out != NULL) && (ret > 0)) { memcpy(out, bm->data, ret); bm->length -= ret; + bm->max -= ret; bm->data += ret; } else if (bm->length == 0) { ret = b->num; -- cgit v1.2.3