mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-07-27 17:08:58 -04:00
IFF: fix buffer read overflow
This commit is contained in:
@@ -3012,7 +3012,7 @@ QByteArray IDATChunk::strideRead(QIODevice *d, qint32 y, const IHDRChunk *header
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (header->model() == IHDRChunk::CLut4) {
|
if (header->model() == IHDRChunk::CLut4) {
|
||||||
if (rr.size() < header->width() / 2) {
|
if (rr.size() < (qint64(header->width()) + 1) / 2) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
QByteArray tmp(header->width(), char());
|
QByteArray tmp(header->width(), char());
|
||||||
|
|||||||
Reference in New Issue
Block a user