aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-04-24 10:18:57 +0900
committerHermet Park <hermetpark@gmail.com>2019-04-24 10:18:57 +0900
commitbffce65f9c719e7c82724ffb5c7557b6ee5e4966 (patch)
tree0f4fc541663d4993ec481c7e40920edb39b911d0
parentRevert "evas-wbmp: revert previous two patches" (diff)
downloadefl-bffce65f9c719e7c82724ffb5c7557b6ee5e4966.tar.gz
evas wbmp loader: coming previous patch with fixing wrong calc.
Those bits must be rounded if they are not fit to 8 bits. see: 68fe9ec6bf60b4730ad7fdbf2698dc7aa130b94d
-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 7f56da6d02..181b14fa90 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) >> 3) + position != length)
+ if ((((w * h) + 7) >> 3) + 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) >> 3) + position != length)
+ if ((((w * h) + 7) >> 3) + position != length)
{
*error = EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
goto bail;