mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-06-03 17:08:08 -04:00
Fix RGBHandler::canRead
Summary: As one can see in SGIImage::readImage the accepted images are _stream >> u16; if (u16 != 0x01da) { return false; } _stream >> _rle; if (_rle > 1) { return false; } so not only \x01\xda\x01 but also \x01\xda\x00 Reviewers: svuorela Reviewed By: svuorela Subscribers: svuorela, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20145
This commit is contained in:
parent
bd704045e6
commit
9fc6967f4f
@ -709,7 +709,7 @@ bool RGBHandler::canRead(QIODevice *device)
|
|||||||
device->seek(oldPos);
|
device->seek(oldPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
return head.size() >= 4 && head.startsWith("\x01\xda\x01") && (head[3] == 1 || head[3] == 2);
|
return head.size() >= 4 && head.startsWith("\x01\xda") && (head[2] == 0 || head[2] == 1) && (head[3] == 1 || head[3] == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user