diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-03-09 22:32:50 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-03-09 22:34:17 +0100 |
commit | ebf9a9871a1424469c6850d1844b1487e32d137a (patch) | |
tree | c7ca6688df4a8bbea7881ac664750fe5bb179a08 /src/kernel | |
parent | cc46bf4ecb4a9b79f4a11d08a68b09e6871dc1a6 (diff) | |
download | tqt3-ebf9a9871a1424469c6850d1844b1487e32d137a.tar.gz tqt3-ebf9a9871a1424469c6850d1844b1487e32d137a.zip |
Fix security issue CVE-2014-0190
[taken from RedHat Qt3 patches]
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/qasyncimageio.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kernel/qasyncimageio.cpp b/src/kernel/qasyncimageio.cpp index c42e876ef..489d69af2 100644 --- a/src/kernel/qasyncimageio.cpp +++ b/src/kernel/qasyncimageio.cpp @@ -904,7 +904,12 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer, sheight = newtop + newheight; if (img.isNull()) { - img.create(swidth, sheight, 32); + if (!img.create(swidth, sheight, 32)) { + // Check if the attempt to create the image failed. If + // it did, the image is broken and we should give up. + state = Error; + return -1; + } memset( img.bits(), 0, img.numBytes() ); if (consumer) consumer->setSize(swidth, sheight); } |