Skip to content

Commit

Permalink
Fix handshake hole assert failed and coredump (#479)
Browse files Browse the repository at this point in the history
Co-authored-by: wangfuyu <[email protected]>
  • Loading branch information
wangfuyu and wangfuyu authored Oct 7, 2023
1 parent 8890b98 commit 95bc8f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/liblsquic/lsquic_mini_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,11 @@ continue_handshake (struct mini_conn *mc)
*/
TAILQ_FOREACH(packet_in, &mc->mc_packets_in, pi_next)
{
assert(n_hsk_chunks < sizeof(hsk_chunks) / sizeof(hsk_chunks[0]));
if (n_hsk_chunks >= sizeof(hsk_chunks) / sizeof(hsk_chunks[0])) {
LSQ_WARN("too many handshake packets");
return -1;
}

if (0 == (packet_in->pi_flags & PI_HSK_STREAM))
continue;
s = parse_frame(packet_in->pi_data + packet_in->pi_hsk_stream,
Expand Down

0 comments on commit 95bc8f9

Please sign in to comment.