mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 07:25:39 +01:00
Change variable bytes_written to header_bytes in record decompression
The name is changed to better reflect the input, decompression case
This commit is contained in:
parent
5462e02874
commit
a9ceef8e03
@ -2155,7 +2155,7 @@ static int ssl_decompress_buf( mbedtls_ssl_context *ssl )
|
||||
{
|
||||
int ret;
|
||||
unsigned char *msg_post = ssl->in_msg;
|
||||
ptrdiff_t bytes_written = ssl->in_msg - ssl->in_buf;
|
||||
ptrdiff_t header_bytes = ssl->in_msg - ssl->in_buf;
|
||||
size_t len_pre = ssl->in_msglen;
|
||||
unsigned char *msg_pre = ssl->compress_buf;
|
||||
|
||||
@ -2176,7 +2176,7 @@ static int ssl_decompress_buf( mbedtls_ssl_context *ssl )
|
||||
ssl->transform_in->ctx_inflate.avail_in = len_pre;
|
||||
ssl->transform_in->ctx_inflate.next_out = msg_post;
|
||||
ssl->transform_in->ctx_inflate.avail_out = MBEDTLS_SSL_BUFFER_LEN -
|
||||
bytes_written;
|
||||
header_bytes;
|
||||
|
||||
ret = inflate( &ssl->transform_in->ctx_inflate, Z_SYNC_FLUSH );
|
||||
if( ret != Z_OK )
|
||||
@ -2186,7 +2186,7 @@ static int ssl_decompress_buf( mbedtls_ssl_context *ssl )
|
||||
}
|
||||
|
||||
ssl->in_msglen = MBEDTLS_SSL_BUFFER_LEN -
|
||||
ssl->transform_in->ctx_inflate.avail_out - bytes_written;
|
||||
ssl->transform_in->ctx_inflate.avail_out - header_bytes;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "after decompression: msglen = %d, ",
|
||||
ssl->in_msglen ) );
|
||||
|
Loading…
Reference in New Issue
Block a user