From c3152506e226c1951393d4f566c78337b553dd52 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 31 Jan 2019 01:19:52 +0100 Subject: [PATCH] xcf: Fix assert in files with two PROP_COLORMAP It's most probably a broken file but better if we don't assert ^_^ oss-fuzz/12780 --- src/imageformats/xcf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/imageformats/xcf.cpp b/src/imageformats/xcf.cpp index 3cbd06b..1044f3e 100644 --- a/src/imageformats/xcf.cpp +++ b/src/imageformats/xcf.cpp @@ -451,6 +451,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream &xcf_io, XCFImage &xcf_imag return false; } + xcf_image.palette = QVector(); xcf_image.palette.reserve(xcf_image.num_colors); for (int i = 0; i < xcf_image.num_colors; i++) {