diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2024-02-07 18:56:22 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2024-03-12 14:23:54 +0100 |
commit | 22c99cf498103c86baa5a415ca34630396e5b6aa (patch) | |
tree | 65e86687aee75c0431cf1752cce8de82cc59663f /tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp | |
parent | c468dfedd6413994a72c41a53eadd1944eb52e6d (diff) |
QHttp2ProtocolHandler: prevent truncation in arithmetic operations
On 64-bit systems, both the requests.size() and the
activeStreams.size() were truncated to uint32_t values from int64_t
ones. While extremely unlikely that either will contain more than 4Gi
elements, avoid the truncation by verifying that the `max` amount of
streams is larger than the activeStreams, and then using size_t for
the range.
Pick-to: 6.7
Change-Id: I50644cb634bab0f020acf9aea1d03744b11dbe51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Diffstat (limited to 'tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp')
0 files changed, 0 insertions, 0 deletions