Skip to content

Commit

Permalink
additional length check
Browse files Browse the repository at this point in the history
  • Loading branch information
sftcd committed Dec 17, 2023
1 parent ff6c6c7 commit 891722b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ssl/ech.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ static int ECHConfigList_from_binary(unsigned char *binbuf, size_t binblen,
ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
goto err;
}
/* the length of one ECHConfig can't be more than that of the list */
if (ech_content_length >= olen) {
ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
goto err;
}
remaining = PACKET_remaining(&pkt);
if (ech_content_length > (remaining + 2)) {
ERR_raise(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR);
Expand Down

0 comments on commit 891722b

Please sign in to comment.