mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-27 16:51:30 +02: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
@ -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…
x
Reference in New Issue
Block a user