Skip to content

Commit

Permalink
Compatible with 16+ Bytes scid (#244)
Browse files Browse the repository at this point in the history
Co-authored-by: ivanfywang <[email protected]>
  • Loading branch information
wangfuyu and ivanfywang authored Mar 29, 2021
1 parent 10e0dad commit f3690fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/liblsquic/lsquic_handshake.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,15 +1143,15 @@ static int parse_hs_data (struct lsquic_enc_session *enc_session, uint32_t tag,
break;

case QTAG_SCID:
if (len != SCID_LENGTH)
if (len < SCID_LENGTH)
return -1;
if (is_client)
{
memcpy(enc_session->info->sscid, val, len);
memcpy(enc_session->info->sscid, val, SCID_LENGTH);
}
else
{
memcpy(hs_ctx->scid, val, len);
memcpy(hs_ctx->scid, val, SCID_LENGTH);
hs_ctx->set |= HSET_SCID;
}
ESHIST_APPEND(enc_session, ESHE_SET_SCID);
Expand Down

0 comments on commit f3690fd

Please sign in to comment.