commit | 957f0fa1f726b28ecd6715dede67bd586e1b1c3d | [log] [tgz] |
---|---|---|
author | Jerry Yu <jerry.h.yu@arm.com> | Fri Sep 24 10:27:07 2021 +0800 |
committer | Jerry Yu <jerry.h.yu@arm.com> | Mon Sep 27 16:34:58 2021 +0800 |
tree | 00bc73a49b30f60a6ff6d4e5b5ca4ae6d10962c0 | |
parent | e06f4532efffe9f0c7b717fdc23ff1752fce8ebd [diff] [blame] |
Add length macro for in_ctr Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_srv.c b/library/ssl_srv.c index b8c4314..147bb78 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c
@@ -1220,7 +1220,7 @@ return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER ); } - memcpy( ssl->cur_out_ctr + 2, ssl->in_ctr + 2, 6 ); + memcpy( ssl->cur_out_ctr + 2, ssl->in_ctr + 2, MBEDTLS_SSL_IN_CTR_LEN - 2 ); #if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) if( mbedtls_ssl_dtls_replay_check( ssl ) != 0 )