forked from enlightenment/efl
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.
This commit is contained in:
parent
79183150c7
commit
808df5ecc2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue