From 3e9ed8ee190bd3a5696e11ef4a566d63da338816 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 19 Apr 2016 10:30:03 +0200 Subject: initializeInflateStream - assert that stream is not null Coverity is not happy with us testing a pointer (not null) in a couple of places but not in initializeInflateStream. In fact we _always_ test this pointer _before_ calling initializeInflateStream. Anyway, let's make this pre-condition clear by Q_ASSERT()ing it. Change-Id: Ibce99ef6ff1d4e09e3a446a672fa28fc93ab832c Reviewed-by: Edward Welbourne Reviewed-by: Timur Pocheptsov --- src/network/access/qhttpnetworkreply.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/network/access/qhttpnetworkreply.cpp') diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp index 9476cf8715..24ada3a81f 100644 --- a/src/network/access/qhttpnetworkreply.cpp +++ b/src/network/access/qhttpnetworkreply.cpp @@ -738,6 +738,8 @@ qint64 QHttpNetworkReplyPrivate::readBody(QAbstractSocket *socket, QByteDataBuff #ifndef QT_NO_COMPRESS int QHttpNetworkReplyPrivate::initializeInflateStream() { + Q_ASSERT(inflateStrm); + inflateStrm->zalloc = Z_NULL; inflateStrm->zfree = Z_NULL; inflateStrm->opaque = Z_NULL; -- cgit v1.2.3