We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f2659d commit 1a3fb98Copy full SHA for 1a3fb98
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