mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 05:55:40 +01:00
Remove integer parsing macro
If this is introduced, it should be defined in a prominent place and put to use throughout the library, but this is left for another time.
This commit is contained in:
parent
f5466258b4
commit
9eca276768
@ -5098,12 +5098,9 @@ static int ssl_parse_record_header( mbedtls_ssl_context const *ssl,
|
||||
* Parse record length.
|
||||
*/
|
||||
|
||||
#define READ_UINT16_BE( p ) \
|
||||
( ( *( (unsigned char*)( p ) + 0 ) << 8 ) | \
|
||||
( *( (unsigned char*)( p ) + 1 ) << 0 ) )
|
||||
|
||||
rec->data_offset = rec_hdr_len_offset + rec_hdr_len_len;
|
||||
rec->data_len = (size_t) READ_UINT16_BE( buf + rec_hdr_len_offset );
|
||||
rec->data_len = ( (size_t) buf[ rec_hdr_len_offset + 0 ] << 8 ) |
|
||||
( (size_t) buf[ rec_hdr_len_offset + 1 ] << 0 );
|
||||
MBEDTLS_SSL_DEBUG_BUF( 4, "input record header", buf, rec->data_offset );
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "input record: msgtype = %d, "
|
||||
|
Loading…
Reference in New Issue
Block a user