diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2024-06-03 15:10:43 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-06-03 17:07:45 +0000 |
commit | 933f52aa1fca68257112cb2811b988ff03f9a205 (patch) | |
tree | 67c76368200bca8a8ae2d17887c94a022e326906 /dist | |
parent | c80421788c775341a995d1cf37d4248aff5f9851 (diff) |
Fix macjp2 canRead() function6.7
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.5
Change-Id: I39b1ba9a344478fe1255c89f19488f0bc54d2ec1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 7ab89526084bdf0118abb31c8e2f980b619a7b3a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b2405d3411928014ec58a7e3938c53f502fe01b1)
Diffstat (limited to 'dist')
0 files changed, 0 insertions, 0 deletions