Skip to content

Commit 79a8a2b

Browse files
fix bugs when parsing the ack ext frame (#517)
1 parent 663e34b commit 79a8a2b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/transport/xqc_frame_parser.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3329,6 +3329,9 @@ xqc_parse_timestamps_in_ack_ext(xqc_packet_in_t *packet_in, xqc_connection_t *co
33293329
if (cur_range_length >= XQC_RECV_TIMESTAMPS_INFO_MAX_LENGTH) {
33303330
return -XQC_EACK_EXT_ABN_VAL;
33313331
}
3332+
if (cur_range_length == 0) {
3333+
return -XQC_EIGNORE_PKT;
3334+
}
33323335

33333336
for (int j = 0; j < cur_range_length; ++j) {
33343337
vlen = xqc_vint_read(p, end, &cur_time_delta);
@@ -3406,4 +3409,4 @@ xqc_parse_ack_ext_frame(xqc_packet_in_t *packet_in, xqc_connection_t *conn,
34063409
}
34073410
}
34083411
return XQC_OK;
3409-
}
3412+
}

0 commit comments

Comments
 (0)