We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a9e048 commit 3894c78Copy full SHA for 3894c78
1 file changed
dtls.c
@@ -3430,6 +3430,11 @@ check_server_certificate(dtls_context_t *ctx,
3430
int err;
3431
dtls_handshake_parameters_t *config = peer->handshake_params;
3432
3433
+ if (data_length < DTLS_HS_LENGTH + DTLS_EC_SUBJECTPUBLICKEY_SIZE + sizeof(uint24)) {
3434
+ dtls_alert("the packet length does not match the expected\n");
3435
+ return dtls_alert_fatal_create(DTLS_ALERT_DECODE_ERROR);
3436
+ }
3437
+
3438
update_hs_hash(peer, data, data_length);
3439
3440
assert(is_key_exchange_ecdhe_ecdsa(config->cipher_index));
0 commit comments