The canRead() function is supposed to check for the presence of a 12
byte magic number (header). It used qstrncmp() for this, but as the
byte sequence starts with 0 values, the comparison would end after the
first byte, and any data also starting with a 0 value would be taken
as matching.
This would make QImageReader mis-identify the image format of image
data where an explicit suffix or data format was lacking, resulting in
image reading failures. The macheif autotest would hit this issue and
fail erroneously.
Pick-to: 6.7 6.5
Change-Id: I39b1ba9a344478fe1255c89f19488f0bc54d2ec1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit
|
||
---|---|---|
.. | ||
auto | ||
benchmarks | ||
shared/images | ||
CMakeLists.txt |