Fix crash issue when we decode some bmp 34/272534/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 18 Mar 2022 08:18:38 +0000 (17:18 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 18 Mar 2022 10:43:34 +0000 (19:43 +0900)
commit5f5ee490cd4805c6b0737ab2be199a8da40df8ca
tree21c6766b3e656ed06bae392129f704560c1a8fd4
parent33aaff6561097653835b8ac394a9651da924a52e
Fix crash issue when we decode some bmp

Some code use 'char' instead of 'unsigned char'.
and next, try to convert that value as 'unsigned int'
If char value was 255 (== -1), converted value become INT_MAX.

This patch make BMP decoder use correct data format

Change-Id: I4f08e28c916eb34f2d06da452b6dde6638d1789b
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
automated-tests/images/flag-24bpp.bmp.buffer [moved from automated-tests/images/flag-24bpp.buffer with 100% similarity]
automated-tests/images/w3c_home_256.bmp [new file with mode: 0755]
automated-tests/images/w3c_home_256.bmp.buffer [new file with mode: 0644]
automated-tests/src/dali-adaptor-internal/utc-Dali-BmpLoader.cpp
dali/internal/imaging/common/loader-bmp.cpp