diff options
author | Marc Mutz <[email protected]> | 2019-07-16 11:23:37 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2022-03-19 11:25:19 +0000 |
commit | ed41fb59cad2fabc9b9382c703d16cec8f904acd (patch) | |
tree | 7082659fbad5ec392edd7582941fc2763a9a564a /src/quick/items/qquickaccessibleattached.cpp | |
parent | fc1ec5cf4a34b210313eaa26bb0e0229007e58d6 (diff) |
QSGOpenGLDistanceFieldGlyphCache: fix multiplication result truncation
The type of the expression int * int is int, so truncation has already
happened when the result is assigned to a qint64.
Fix by casting one of the multiplicants to qint64 before performing
the multiplication. This multiplication cannot overflow, because int
is 32-bit on all supported platforms.
The addition of 'size' to the pointer will still truncate the result,
on 32bit platforms, but that check is in itself UB. A follow-up commit
will fix the check, and with it the last truncation to 32bit.
Coverity-Id: 218769
Change-Id: I0d71950695b9743db8c96d825e68bb1e9c47de02
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit cacfc1dbb9719c0ef55cff69dad0921ce1405438)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
Diffstat (limited to 'src/quick/items/qquickaccessibleattached.cpp')
0 files changed, 0 insertions, 0 deletions