mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 03:42:06 +00:00
HTTP/2: improved HPACK integer parsing code readability.
No functional changes.
This commit is contained in:
parent
faed7212fe
commit
c830cf28ae
1 changed files with 3 additions and 3 deletions
|
|
@ -2396,8 +2396,8 @@ ngx_http_v2_parse_int(ngx_http_v2_connection_t *h2c, u_char **pos, u_char *end,
|
|||
return value;
|
||||
}
|
||||
|
||||
if (end - p > NGX_HTTP_V2_INT_OCTETS - 1) {
|
||||
end = p + NGX_HTTP_V2_INT_OCTETS - 1;
|
||||
if (end - start > NGX_HTTP_V2_INT_OCTETS) {
|
||||
end = start + NGX_HTTP_V2_INT_OCTETS;
|
||||
}
|
||||
|
||||
for (shift = 0; p != end; shift += 7) {
|
||||
|
|
@ -2417,7 +2417,7 @@ ngx_http_v2_parse_int(ngx_http_v2_connection_t *h2c, u_char **pos, u_char *end,
|
|||
}
|
||||
}
|
||||
|
||||
if ((size_t) (end - start) >= NGX_HTTP_V2_INT_OCTETS) {
|
||||
if (end == start + NGX_HTTP_V2_INT_OCTETS) {
|
||||
return NGX_DECLINED;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue