]> git.kaiwu.me - 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>
Tue, 23 Dec 2025 18:40:33 +0000 (22:40 +0400)
commit2b502468588835e479fcd76a2cc0d00394f2c32c
tree4698556291a3dde086aaaa1d2ad121127bf7e3ce
parent35dfd3f1c9e29a1d894ee170a6f9316ef679892a
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