mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
JXL: Fix OSS Fuzz issue 377971416
This commit is contained in:
parent
8265b3602b
commit
b645c9c258
@ -1172,7 +1172,7 @@ bool QJpegXLHandler::decodeBoxes()
|
||||
JxlDecoderGetBoxType(m_decoder, type, JXL_FALSE);
|
||||
if (memcmp(type, "xml ", 4) == 0) {
|
||||
uint64_t size;
|
||||
if (JxlDecoderGetBoxSizeRaw(m_decoder, &size) == JXL_DEC_SUCCESS) {
|
||||
if (JxlDecoderGetBoxSizeRaw(m_decoder, &size) == JXL_DEC_SUCCESS && size < uint64_t(kMaxQVectorSize)) {
|
||||
m_xmp = QByteArray(size, '\0');
|
||||
JxlDecoderSetBoxBuffer(m_decoder, reinterpret_cast<uint8_t *>(m_xmp.data()), m_xmp.size());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user