mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2026-02-12 13:22:59 -05:00
ANI: check for array allocation size
This commit is contained in:
@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ani_p.h"
|
#include "ani_p.h"
|
||||||
|
#include "util_p.h"
|
||||||
|
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
@ -101,7 +102,7 @@ bool ANIHandler::read(QImage *outImage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const auto frameSize = *(reinterpret_cast<const quint32_le *>(frameSizeData.data()));
|
const auto frameSize = *(reinterpret_cast<const quint32_le *>(frameSizeData.data()));
|
||||||
if (!frameSize) {
|
if (!frameSize || frameSize > quint32(kMaxQVectorSize)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user