mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 21:01:19 +00:00
Don't use memcpy() for 2-byte copy operation
Manual copying is slightly shorter here.
This commit is contained in:
parent
9eca276768
commit
d0b66d08bb
|
@ -5056,13 +5056,11 @@ static int ssl_parse_record_header( mbedtls_ssl_context const *ssl,
|
||||||
* Parse and validate record version
|
* Parse and validate record version
|
||||||
*/
|
*/
|
||||||
|
|
||||||
memcpy( &rec->ver[0],
|
rec->ver[0] = buf[ rec_hdr_version_offset + 0 ];
|
||||||
buf + rec_hdr_version_offset,
|
rec->ver[1] = buf[ rec_hdr_version_offset + 1 ];
|
||||||
rec_hdr_version_len );
|
|
||||||
|
|
||||||
mbedtls_ssl_read_version( &major_ver, &minor_ver,
|
mbedtls_ssl_read_version( &major_ver, &minor_ver,
|
||||||
ssl->conf->transport,
|
ssl->conf->transport,
|
||||||
buf + rec_hdr_version_offset );
|
&rec->ver[0] );
|
||||||
|
|
||||||
if( major_ver != ssl->major_ver )
|
if( major_ver != ssl->major_ver )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue