Prevent infinite loops by handling all ZLIB errors
authorShane Kearns <ext-shane.2.kearns@nokia.com>
Mon, 21 May 2012 09:54:37 +0000 (10:54 +0100)
committerQt by Nokia <qt-info@nokia.com>
Mon, 21 May 2012 14:03:41 +0000 (16:03 +0200)
commit63e996200268599522db97d9a0ef37f43d5ca506
treed087fd6341ca629af5dac206fc946b4b07d5566b
parent22ef455c6dc7c7f5e9447a82095abd9c4b380656
Prevent infinite loops by handling all ZLIB errors

In case the HTTP server returns more data after the end of the
compressed data stream, inflate will return Z_STREAM_END, which
is a normal informative error code.
This was handled in 4.8, but lost in 5.0.
Also catch all ZLIB negative error codes rather than only three.

Task-number: QTBUG-25823
Change-Id: Ibdbbd3dd6fa81a0880c477cb080ad35f2d7116f0
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
src/network/access/qhttpnetworkreply.cpp