Skip to content

Commit 431079d

Browse files
committed
dtls.c: complete verification of length of Alert record.
Fixes issue #255 Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
1 parent 8a9e048 commit 431079d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dtls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4491,7 +4491,7 @@ handle_alert(dtls_context_t *ctx, dtls_peer_t *peer,
44914491

44924492
assert(peer);
44934493

4494-
if (data_length < 2)
4494+
if (data_length != 2)
44954495
return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
44964496

44974497
dtls_info("** Alert: level %d, description %d\n", data[0], data[1]);

0 commit comments

Comments
 (0)