From 4912bf74280caa7aec5b206e29b103d594075123 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) (cherry picked from commit d34bce03acc53c583df954bbed65d4800751563a) --- 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 abf0f04111..8c621d6c1e 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