summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-04-24 14:01:06 +0900
committerHermet Park <hermetpark@gmail.com>2019-04-24 14:03:37 +0900
commit808df5ecc229455580685fbe2dac7ab100a092d1 (patch)
treecf4a61abfc5635312f39f850ec0aae936d59d1af
parent79183150c7182af5b06cb2363f822cab433b4990 (diff)
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.
-rw-r--r--src/modules/evas/image_loaders/wbmp/evas_image_load_wbmp.c4
1 files 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,
76 76
77 /* Wbmp header identifier is too weak.... 77 /* Wbmp header identifier is too weak....
78 Here checks size validation whether it's acutal wbmp or not. */ 78 Here checks size validation whether it's acutal wbmp or not. */
79 if ((((w * h) + 7) >> 3) + position != length) 79 if ((((w + 7) >> 3) * h) + position != length)
80 { 80 {
81 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; 81 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
82 goto bail; 82 goto bail;
@@ -138,7 +138,7 @@ evas_image_load_file_data_wbmp(void *loader_data,
138 138
139 /* Wbmp header identifier is too weak.... 139 /* Wbmp header identifier is too weak....
140 Here checks size validation whether it's acutal wbmp or not. */ 140 Here checks size validation whether it's acutal wbmp or not. */
141 if ((((w * h) + 7) >> 3) + position != length) 141 if ((((w + 7) >> 3) * h) + position != length)
142 { 142 {
143 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT; 143 *error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
144 goto bail; 144 goto bail;