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++
Don't try to read image pointer until PID is verified
Dmitry Kazakov820fee34f43f
diff --git a/libs/ui/kis_mimedata.cpp b/libs/ui/kis_mimedata.cppindex 03ad5cb1d4..dc80ad494f 100644--- a/libs/ui/kis_mimedata.cpp+++ b/libs/ui/kis_mimedata.cpp@@ -427,10 +427,11 @@ QList<KisNodeSP> KisMimeData::tryLoadInternalNodes(const QMimeData *data,QDomElement root = doc.documentElement();qint64 pid = root.attribute("application_pid").toLongLong();forceCopy = root.attribute("force_copy").toInt();- qint64 imagePointerValue = root.attribute("image_pointer_value").toLongLong();- sourceImage = reinterpret_cast<KisImage*>(imagePointerValue);if (pid == QApplication::applicationPid()) {+ qint64 imagePointerValue = root.attribute("image_pointer_value").toLongLong();+ sourceImage = reinterpret_cast<KisImage*>(imagePointerValue);+QDomElement e;for (e = root.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {qint64 pointerValue = e.attribute("pointer_value").toLongLong();