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
This commit is contained in:
Albert Astals Cid
2019-01-31 01:19:52 +01:00
parent de7a9a8457
commit c3152506e2

View File

@ -451,6 +451,7 @@ bool XCFImageFormat::loadImageProperties(QDataStream &xcf_io, XCFImage &xcf_imag
return false; return false;
} }
xcf_image.palette = QVector<QRgb>();
xcf_image.palette.reserve(xcf_image.num_colors); xcf_image.palette.reserve(xcf_image.num_colors);
for (int i = 0; i < xcf_image.num_colors; i++) { for (int i = 0; i < xcf_image.num_colors; i++) {