Compare commits

..

2 Commits

Author SHA1 Message Date
8658355701 Fix crash on malformed files
oss-fuzz/449485443
2025-10-05 21:25:48 +00:00
3c8539d53d Update version to 6.20.0 2025-10-05 15:16:13 +02:00
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
set(KF_VERSION "6.19.0") # handled by release scripts
set(KF_VERSION "6.20.0") # handled by release scripts
set(KF_DEP_VERSION "6.19.0") # handled by release scripts
project(KImageFormats VERSION ${KF_VERSION})

View File

@ -545,8 +545,12 @@ bool CMAPChunk::innerReadStructure(QIODevice *d)
QList<QRgb> CMAPChunk::innerPalette() const
{
QList<QRgb> l;
auto &&d = data();
for (qint32 i = 0, n = count(); i < n; ++i) {
const QByteArray &d = data();
const qint32 n = count();
if (n * 3 > d.size()) {
return {};
}
for (qint32 i = 0; i < n; ++i) {
auto i3 = i * 3;
l << qRgb(d.at(i3), d.at(i3 + 1), d.at(i3 + 2));
}