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