mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-03-23 05:25:09 +00:00
Clear internal decrypted buffer after read
This commit is contained in:
parent
7d2434fac2
commit
cafb6c91b0
|
@ -11119,6 +11119,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 */
|
||||
|
|
Loading…
Reference in a new issue