mirror of
https://github.com/moparisthebest/curl
synced 2024-11-05 09:05:04 -05:00
http2: A value is being subtracted from the unsigned variable
PVS-Studio warning Fixes #4402
This commit is contained in:
parent
9aed993da0
commit
f91b82e688
@ -1775,8 +1775,9 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
|
||||
field list. */
|
||||
#define AUTHORITY_DST_IDX 3
|
||||
|
||||
/* USHRT_MAX is 65535 == 0xffff */
|
||||
#define HEADER_OVERFLOW(x) \
|
||||
(x.namelen > (uint16_t)-1 || x.valuelen > (uint16_t)-1 - x.namelen)
|
||||
(x.namelen > 0xffff || x.valuelen > 0xffff - x.namelen)
|
||||
|
||||
/*
|
||||
* Check header memory for the token "trailers".
|
||||
|
Loading…
Reference in New Issue
Block a user