mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-05-25 13:08:28 -04:00
EXR: fix Null-dereference READ in OpenEXR
This commit is contained in:
@@ -236,11 +236,12 @@ static QStringList viewList(const Imf::Header &h)
|
|||||||
{
|
{
|
||||||
QStringList l;
|
QStringList l;
|
||||||
if (auto views = h.findTypedAttribute<Imf::StringVectorAttribute>("multiView")) {
|
if (auto views = h.findTypedAttribute<Imf::StringVectorAttribute>("multiView")) {
|
||||||
|
// Internally OpenEXR first checks if the multiView attribute is present:
|
||||||
|
// if present, I have no other layers.
|
||||||
for (auto &&v : views->value()) {
|
for (auto &&v : views->value()) {
|
||||||
l << QString::fromStdString(v);
|
l << QString::fromStdString(v);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if (l.isEmpty()) {
|
|
||||||
// Recent versions of Photoshop save images by setting the layer.
|
// Recent versions of Photoshop save images by setting the layer.
|
||||||
// Channels are named Layer 1.A, Layer 1.B, etc., so I have to set
|
// Channels are named Layer 1.A, Layer 1.B, etc., so I have to set
|
||||||
// the layer or the images will appear black.
|
// the layer or the images will appear black.
|
||||||
|
|||||||
Reference in New Issue
Block a user