jsonrpc: mitigate the risk of unbounded memory allocations


Prevent possible unbounded memory allocation from Content-Length
headers by validating and enforcing a configurable maximum content
length limit.

By default, INT_MAX is the maximum content length.

Fixes: QTBUG-147682
Fixes: QTBUG-147683
Change-Id: Ic4fada78ea61b11f9764d7999730798acb76dad3
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
commit00a6eaeb9f5d3132f3c87954d1ea35982d6a2335
parent754230200151d0dce6453edd9fd0b15f47bd9dd3
authorSemih Yavuz <semih.yavuz@qt.io>
committerSemih Yavuz <semih.yavuz@qt.io>
commit timeMon, 6 Jul 2026 08:31:15 +0000