]> git.feebdaed.xyz Git - 0xmirror/nginx.git/commit
HTTP/2: extended guard for NULL buffer and zero length.
authorSergey Kandaurov <pluknet@nginx.com>
Fri, 14 Nov 2025 14:14:18 +0000 (18:14 +0400)
committerSergey Kandaurov <s.kandaurov@f5.com>
Wed, 19 Nov 2025 14:52:54 +0000 (18:52 +0400)
commit6ed1188411882086e3518eda779ab782d8ab4d3f
tree8d4e3f7f062940e9ef7ade2a1255febc75f71441
parent9d04b6630aa77de45d8946f84edfc6c174f15c70
HTTP/2: extended guard for NULL buffer and zero length.

In addition to moving memcpy() under the length condition in 15bf6d8cc,
which addressed a reported UB due to string function conventions, this
is repeated for advancing an input buffer, to make the resulting code
more clean and readable.

Additionally, although considered harmless for both string functions and
additive operators, as previously discussed in GitHub PR 866, this fixes
the main source of annoying sanitizer reports in the module.

Prodded by UndefinedBehaviorSanitizer (pointer-overflow).
src/http/v2/ngx_http_v2.c