mirror of
https://github.com/curl/curl.git
synced 2026-07-25 21:27:18 +03: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
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue