mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
httpcommon.hpp: Add missing cast from CONTENT_LENGTH_TYPE to size_t
With the std::max we do make sure it is > 0, so this should be safe. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit is contained in:
parent
97924d6c92
commit
cc5e61e81b
@ -441,7 +441,7 @@ class HTTPBase : public REFCOUNT_BASE
|
||||
}
|
||||
else if (rr_content_length >= 0)
|
||||
{
|
||||
const size_t needed = std::max(rr_content_length - rr_content_bytes, CONTENT_LENGTH_TYPE(0));
|
||||
const size_t needed = static_cast<size_t>(std::max(rr_content_length - rr_content_bytes, CONTENT_LENGTH_TYPE(0)));
|
||||
if (needed <= buf.size())
|
||||
{
|
||||
done = true;
|
||||
|
Loading…
Reference in New Issue
Block a user