diff options
author | Robert Loehning <robert.loehning@qt.io> | 2020-08-25 16:06:02 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2020-08-26 03:10:47 +0000 |
commit | 103aace3b30ede9e5f5621e14542f5369eac749d (patch) | |
tree | a1d46c31e2145a7c368f244a4c60625eb39cc4e8 /src/svg | |
parent | d71817248621651dc44d0ba67a74cd05d5f9619c (diff) | |
download | qtsvg-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/svg')
-rw-r--r-- | src/svg/qsvgtinydocument.cpp | 2 |
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); |