Merge remote-tracking branch 'public/pr/2979' into baremetal

This commit is contained in:
Simon Butcher 2020-01-08 18:15:52 +00:00
commit 05ca9d46c1

View file

@ -11128,6 +11128,9 @@ int mbedtls_ssl_read( mbedtls_ssl_context *ssl, unsigned char *buf, size_t len )
mbedtls_platform_memcpy( buf, ssl->in_offt, n );
ssl->in_msglen -= n;
// clear incoming data after it's copied to buffer
mbedtls_platform_memset(ssl->in_offt, 0, n);
if( ssl->in_msglen == 0 )
{
/* all bytes consumed */