zmike pushed a commit to branch efl-1.22. http://git.enlightenment.org/core/efl.git/commit/?id=1fc732a1ecf5c3d7161d2b59c95793cbe99304b6
commit 1fc732a1ecf5c3d7161d2b59c95793cbe99304b6 Author: Hermet Park <[email protected]> Date: Wed Apr 24 14:01:06 2019 +0900 evas wbmp: fix wrong calc order. Double check patch again, since my wrong logical thinking, Every width must be considered to rounding up fiting 8 bits. this new compuation must be correct. --- src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c b/src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c index 181b14fa90..4a3ae77a32 100644 --- a/src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c +++ b/src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c @@ -76,7 +76,7 @@ evas_image_load_file_head_wbmp(void *loader_data, /* Wbmp header identifier is too weak.... Here checks size validation whether it's acutal wbmp or not. */ - if ((((w * h) + 7) >> 3) + position != length) + if ((((w + 7) >> 3) * h) + position != length) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; @@ -138,7 +138,7 @@ evas_image_load_file_data_wbmp(void *loader_data, /* Wbmp header identifier is too weak.... Here checks size validation whether it's acutal wbmp or not. */ - if ((((w * h) + 7) >> 3) + position != length) + if ((((w + 7) >> 3) * h) + position != length) { *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; goto bail; --
