evas: Fix an issue with 4bit RLE image 53/87053/2
authorjiin.moon <jiin.moon@samsung.com>
Fri, 19 Aug 2016 05:16:39 +0000 (14:16 +0900)
committerJIIN MOON <jiin.moon@samsung.com>
Mon, 12 Sep 2016 07:44:32 +0000 (00:44 -0700)
Without this patch, BMP loader can't region decode with 4bit RLE image

Change-Id: Ib16f5c6aba4a8d537b1fc7bde744df426f3daf47
Signed-off-by: jiin.moon <jiin.moon@samsung.com>
src/modules/evas/image_loaders/bmp/evas_image_load_bmp.c

index 93f4d59..49fb4e8 100644 (file)
@@ -806,7 +806,7 @@ evas_image_load_file_data_bmp(void *loader_data,
                                       count = p[0] / 2;
                                       while (count > 0)
                                         {
-                                           if (x < header.width)
+                                           if (x < image_w)
                                              {
                                                 if ((x >= region_x) && ((x % scale_ratio) == 0) && (scale_x < header.width))
                                                   {
@@ -816,7 +816,7 @@ evas_image_load_file_data_bmp(void *loader_data,
                                                   }
                                                 x++;
                                              }
-                                           if (x < header.width)
+                                           if (x < image_w)
                                              {
                                                 if ((x >= region_x) && ((x % scale_ratio) == 0) && (scale_x < header.width))
                                                   {
@@ -888,7 +888,7 @@ evas_image_load_file_data_bmp(void *loader_data,
                                default:
                                   count = p[1];
                                   if (((p + count) > buffer_end) ||
-                                      ((x + count) > header.width))
+                                      ((x + count) > image_w))
                                     {
                                        p = buffer_end;
                                        break;