diff options
author | Peter Hartmann <phartmann@blackberry.com> | 2013-07-22 10:14:41 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-25 16:12:11 (GMT) |
commit | ed4ef3d23142bd23d62f44babee074d0a102c72f (patch) | |
tree | 509b064cc7d7d675ef5aec5ebab05444f315802e /src | |
parent | 88113a90f012db05e6e0b1ec60ddced02d6673fe (diff) | |
download | Qt-ed4ef3d23142bd23d62f44babee074d0a102c72f.zip Qt-ed4ef3d23142bd23d62f44babee074d0a102c72f.tar.gz Qt-ed4ef3d23142bd23d62f44babee074d0a102c72f.tar.bz2 |
HTTP internals: do not access reply that was deleted already
... rather than crashing.
Task-number: QTBUG-32404
(cherry picked from commit 78f9f4b4970e6f4155b7cf2e88c6ac540dec47bc)
Change-Id: Ibdffcb9f57e841655998cf72d0ee8206b4987aa7
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qhttpnetworkconnectionchannel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 129c459..978066b 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -1063,6 +1063,9 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket errorCode = QNetworkReply::RemoteHostClosedError; } } else if (state == QHttpNetworkConnectionChannel::ReadingState) { + if (!reply) + break; + if (!reply->d_func()->expectContent()) { // No content expected, this is a valid way to have the connection closed by the server return; |