summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-08-25 16:06:02 +0200
committerRobert Loehning <robert.loehning@qt.io>2020-08-26 03:10:47 +0000
commit103aace3b30ede9e5f5621e14542f5369eac749d (patch)
treea1d46c31e2145a7c368f244a4c60625eb39cc4e8 /src
parentd71817248621651dc44d0ba67a74cd05d5f9619c (diff)
downloadqtsvg-103aace3b30ede9e5f5621e14542f5369eac749d.tar.gz
Don't return partially inflated QByteArray
We're already stopping the extraction because we're running out of memory. It's no use to return this provisional result. Pick-to: 5.12 5.15 Task-number: oss-fuzz-24611 Change-Id: Iea5a65a0f30b7a03c5405017c21cd9495a7c2971 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/svg/qsvgtinydocument.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index dd2c1ab..8e12d5c 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -130,7 +130,7 @@ QByteArray qt_inflateGZipDataFrom(QIODevice *device)
if (oldSize > INT_MAX - CHUNK_SIZE) {
inflateEnd(&zlibStream);
qCWarning(lcSvgHandler, "Error while inflating gzip file: integer size overflow");
- return destination;
+ return QByteArray();
}
destination.resize(oldSize + CHUNK_SIZE);