]> git.kaiwu.me - nginx.git/commit
Revert "HTTP/2: fixed overlapping memcpy in CONTINUATION frames"
authorAndrew Clayton <a.clayton@nginx.com>
Mon, 29 Jun 2026 18:03:32 +0000 (19:03 +0100)
committerAndrew Clayton <a.clayton@nginx.com>
Mon, 29 Jun 2026 19:22:32 +0000 (20:22 +0100)
commit072f6fdbac3323fab257280b7119224027b01315
tree6b8f91fad5cc74b122197962055f2daba72e436f
parent42f8df65b694fa193cc2519f91cedd08fbe38a2c
Revert "HTTP/2: fixed overlapping memcpy in CONTINUATION frames"

This reverts commit 2d71bdcf8b34d9a44608920e34f2d031b3a938b6.

This is actually unnecessary. Thanks to Valentin Bartenev for the
analysis

1. ngx_http_v2_handle_continuation() handles split HPACK integers at
   frame boundaries
2. HPACK integers are max 4 bytes (NGX_HTTP_V2_INT_OCTETS)
3. The function is only called when length < 4 (i.e., 1-3 bytes remain)
4. The copy destination is offset by 9 bytes (frame header size)

Since 3 < 9, source and destination never overlap.
src/http/v2/ngx_http_v2.c