Cap chunk-size line length to prevent memory exhaustion


getChunkSize() appended the chunk-size line into the shared fragment
buffer byte by byte with no ceiling, and the body-size limit never
applies (it gates decoded body bytes only). A chunked request with an
endless hex string or unterminated chunk-extension thus grew fragment
until OOM.

Bound it per byte via isHeaderFieldSizeAllowed() (48 KiB),
sending 400 and returning -1.

Fixes: QTBUG-150270
Pick-to: 6.12 6.12.0 6.11
Change-Id: I104d2adca36710ca812e58024dfc5544dcba52af
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
commit988f1d72679f4fe55442af4f431d1c5b11171656
parentb27e832c9e73ca6d03d693c9d1852543cb4305f3
authorMate Barany <mate.barany@qt.io>
committerMate Barany <mate.barany@qt.io>
commit timeMon, 21 Sep 2026 08:13:11 +0000