TGA Plugin: Fix reading of CMapDepth


It's specified to be one byte but the old code used to read an int of
two bytes. Maybe this wasn't noticed because the following byte often
has a value of zero.

This fixes oss-fuzz issue 50741 which is an integer
overflow resulting from the too large value.

[ChangeLog] Fixed reading of TGA files with a non-zero X-origin

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I989bffd0e4e03caf6737e1ce085247ed54e40db0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
commitfeb7864054886bfb8a99d0f8e3a06ae120f97e62
parent958ffd839a32ab11a1793ab2ce0e7f4868df0276
authorRobert Löhning <robert.loehning@qt.io>
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>
commit timeMon, 9 Jan 2023 21:32:59 +0000