We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6f2659d + 1a3fb98 commit 25f54e9Copy full SHA for 25f54e9
1 file changed
src/HttpClient.cpp
@@ -819,7 +819,11 @@ int HttpClient::readHeader()
819
case eReadingContentLength:
820
if (isdigit(c))
821
{
822
- iContentLength = iContentLength*10 + (c - '0');
+ long _iContentLength = iContentLength*10 + (c - '0');
823
+ // Only apply if the value didn't wrap around
824
+ if (_iContentLength > iContentLength) {
825
+ iContentLength = _iContentLength;
826
+ }
827
}
828
else
829
0 commit comments