summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-12-19 14:57:23 +0100
committerMÃ¥rten Nordheim <marten.nordheim@qt.io>2024-01-29 22:43:14 +0100
commit297341396203c5afed6420fa3789485c0996f846 (patch)
tree50f2588ee741867dc32a0e0a5ea8fdf2b1088e6f
parent26d1e0e83e8467b292fd0abb0a563bb914b9b609 (diff)
Http2: don't barf on > 4GiB cumulative headers
The only user of the vector passes begin()/end() to BitIStream, which appears to be 64-bit-clean. Pick-to: 6.7 Change-Id: I4ad0b9e9547008fecc4c816cc92ff9db4b2066e3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
-rw-r--r--src/network/access/http2/http2protocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/http2/http2protocol.cpp b/src/network/access/http2/http2protocol.cpp
index 7d582497ab..8e7e176c41 100644
--- a/src/network/access/http2/http2protocol.cpp
+++ b/src/network/access/http2/http2protocol.cpp
@@ -200,9 +200,9 @@ std::vector<uchar> assemble_hpack_block(const std::vector<Frame> &frames)
{
std::vector<uchar> hpackBlock;
- quint32 total = 0;
+ size_t total = 0;
for (const auto &frame : frames) {
- if (qAddOverflow(total, frame.hpackBlockSize(), &total))
+ if (qAddOverflow(total, size_t{frame.hpackBlockSize()}, &total))
return hpackBlock;
}