代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Backport of:
From 2841e2b61e32f26900bde987d469c8b97ea31999 Mon Sep 17 00:00:00 2001
From: Eirik Aavitsland <eirik.aavitsland@qt.io>
Date: Fri, 3 Aug 2018 13:25:15 +0200
Subject: [PATCH] Check for QImage allocation failure in qgifhandler
Since image files easily can be (or corrupt files claim to be) huge,
it is worth checking for out of memory situations.
Change-Id: I635a3ec6852288079fdec4e14cf7e776fe59e9e0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
---
src/plugins/imageformats/gif/qgifhandler.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Index: qtbase-opensource-src-5.5.1+dfsg/src/gui/image/qgifhandler.cpp
===================================================================
--- qtbase-opensource-src-5.5.1+dfsg.orig/src/gui/image/qgifhandler.cpp 2019-02-05 13:19:41.135941358 -0500
+++ qtbase-opensource-src-5.5.1+dfsg/src/gui/image/qgifhandler.cpp 2019-02-05 13:20:04.364039732 -0500
@@ -348,7 +348,8 @@ int QGIFFormat::decode(QImage *image, co
(*image) = QImage(swidth, sheight, format);
bpl = image->bytesPerLine();
bits = image->bits();
- memset(bits, 0, image->byteCount());
+ if (bits)
+ memset(bits, 0, image->byteCount());
}
// Check if the previous attempt to create the image failed. If it
@@ -409,6 +410,10 @@ int QGIFFormat::decode(QImage *image, co
backingstore = QImage(qMax(backingstore.width(), w),
qMax(backingstore.height(), h),
QImage::Format_RGB32);
+ if (backingstore.isNull()) {
+ state = Error;
+ return -1;
+ }
memset(bits, 0, image->byteCount());
}
const int dest_bpl = backingstore.bytesPerLine();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。