mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-10 09:21:35 -04:00
MINOR: quic: Possible overflow in qpack_get_varint()
This should fix CID 375051 in GH 1536 where a signed integer expression (1 << bit) which could overflow was compared to a uint64_t.
This commit is contained in:
parent
ce2ecc9643
commit
6842485a84
1 changed files with 2 additions and 2 deletions
|
|
@ -67,8 +67,8 @@ static uint64_t qpack_get_varint(const unsigned char **buf, uint64_t *len_in, in
|
|||
uint8_t shift = 0;
|
||||
|
||||
len--;
|
||||
ret = *raw++ & ((1 << b) - 1);
|
||||
if (ret != (uint64_t)((1 << b) - 1))
|
||||
ret = *raw++ & ((1ULL << b) - 1);
|
||||
if (ret != (uint64_t)((1ULL << b) - 1))
|
||||
goto end;
|
||||
|
||||
while (len && (*raw & 128)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue