From 28077218067438fef5cdc746feb45ca6d4e755d9 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 9 Jun 2016 17:13:36 +0200 Subject: Do not warn about invalid images Null or invalid images are safe since we are not decoding them. Change-Id: I292685863a0116c25931c096ec183275c891a55d Task-number: QTBUG-53989 Reviewed-by: Konstantin Tokarev Reviewed-by: Joerg Bornemann --- Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 74696c23d..c93c79b1b 100644 --- a/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/Source/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -93,7 +93,7 @@ void ImageDecoderQt::setData(SharedBuffer* data, bool allDataReceived) // QImageReader only allows retrieving the format before reading the image m_format = m_reader->format(); - if (!isFormatWhiteListed(m_format)) { + if (!m_format.isEmpty() && !isFormatWhiteListed(m_format)) { qWarning("Image of format '%s' blocked because it is not considered safe. If you are sure it is safe to do so, you can white-list the format by setting the environment variable QTWEBKIT_IMAGEFORMAT_WHITELIST=%s", m_format.constData(), m_format.constData()); setFailed(); m_reader.clear(); -- cgit v1.2.1