Update library/ssl_msg.c

Co-authored-by: Gilles Peskine <gilles.peskine@arm.com>
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
ashesman 2022-02-17 11:08:27 +13:00 committed by Dave Rodgman
parent 358f94a71c
commit 937d6d5eab

View file

@ -5593,7 +5593,7 @@ int mbedtls_ssl_read(mbedtls_ssl_context *ssl, unsigned char *buf, size_t len)
n = (len < ssl->in_msglen)
? len : ssl->in_msglen;
if (buf) {
if (len != 0) {
memcpy(buf, ssl->in_offt, n);
ssl->in_msglen -= n;
}