Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix possible out-of-bounds read when loading a Paint Shop Pro palette
Nicholas LaPointe58df841d9da7
diff --git a/libs/pigment/resources/KoColorSet.cpp b/libs/pigment/resources/KoColorSet.cppindex 1cfd2dca66..a220f7396f 100644--- a/libs/pigment/resources/KoColorSet.cpp+++ b/libs/pigment/resources/KoColorSet.cpp@@ -1505,6 +1505,7 @@ bool KoColorSet::Private::loadPsp()if (l[1] != "0100") return false;int entries = l[2].toInt();+ if (entries < 0 || l.size() < entries + 3) return false;KisSwatchGroupSP global = colorSet->getGlobalGroup();