Skip to content

Draft: Use checked image allocation on reading

Depends on: qtbase!277 (closed)

Motivation: https://github.com/nomacs/nomacs/issues/516

QTBUG: https://bugreports.qt.io/browse/QTBUG-85037

The alternative would be to identify and pick those drive-by checks only, but I'm not sure that would be complete.

Use the imageIO's common QImage creation function that implements
QImageReader's allocation limit that was introduced in Qt 6.

A few related checks against corrupt image files added as driveby.

Pick-to: 6.1 6.0
Change-Id: If5b87cd1b7b2de67ecd023a82ae2168a032fa52e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 3dfd4dd8068284465302ecc46cc024e62a931d1a)
Edited by Andreas Sturmlechner

Merge request reports