summaryrefslogtreecommitdiffstats
path: root/ssl/record/dtls1_bitmap.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-26 13:12:24 +0000
committerMatt Caswell <matt@openssl.org>2015-03-26 17:25:48 +0000
commite5bf62f716f71e4df6995a07d1fbc4cad82a2637 (patch)
tree51e3b4d40c88d232744a055aed3527d1fcadf729 /ssl/record/dtls1_bitmap.c
parent3497ac5d333af98947d0356146a0898e2398d321 (diff)
Define SEQ_NUM_SIZE
Replace the hard coded value 8 (the size of the sequence number) with a constant defined in a macro. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record/dtls1_bitmap.c')
-rw-r--r--ssl/record/dtls1_bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/record/dtls1_bitmap.c b/ssl/record/dtls1_bitmap.c
index eef6b246e0..9d2d681fbf 100644
--- a/ssl/record/dtls1_bitmap.c
+++ b/ssl/record/dtls1_bitmap.c
@@ -209,7 +209,7 @@ void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap)
bitmap->map <<= shift, bitmap->map |= 1UL;
else
bitmap->map = 1UL;
- memcpy(bitmap->max_seq_num, seq, 8);
+ memcpy(bitmap->max_seq_num, seq, SEQ_NUM_SIZE);
} else {
shift = -cmp;
if (shift < sizeof(bitmap->map) * 8)