mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 00:14:31 +00:00
BUG/MINOR: quic: Wrong buffer length passed to generate_retry_token()
After having consumed <i> bytes from <buf>, the remaining available room to be passed to generate_retry_token() is sizeof(buf) - i. This bug could be easily reproduced with quic-qo as client which chooses a random value as ODCID length.
This commit is contained in:
parent
0c3205a541
commit
cc2764e7fe
@ -4249,8 +4249,9 @@ static int send_retry(int fd, struct sockaddr_storage *addr,
|
||||
i += scid.len;
|
||||
|
||||
/* token */
|
||||
if (!(token_len = generate_retry_token(&buf[i], &buf[i] - buf, pkt)))
|
||||
if (!(token_len = generate_retry_token(&buf[i], sizeof(buf) - i, pkt)))
|
||||
return 1;
|
||||
|
||||
i += token_len;
|
||||
|
||||
/* token integrity tag */
|
||||
|
Loading…
Reference in New Issue
Block a user