evas_image_load_bmp bug fix
authorJiyoun Park <jy0703.park@samsung.com>
Mon, 1 Aug 2011 08:12:00 +0000 (17:12 +0900)
committerJiyoun Park <jy0703.park@samsung.com>
Mon, 1 Aug 2011 08:12:00 +0000 (17:12 +0900)
there is some bug cause memory crash in evas_image_load_file_head_bmp function
the problem is occurred below case.
bit_count = 32 & comp = 0

so I modify pix end pointed the end of surface

Change-Id: Ie00e599db377b82ffccd4238f2c4163732096b6a

src/modules/loaders/bmp/evas_image_load_bmp.c

index 40253d4..a391ef8 100644 (file)
@@ -979,7 +979,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
                        ie->flags.alpha = 0;
                        if (hasa)
                          {
-                            unsigned int *pixend = pix + (w * h);
+                            unsigned int *pixend = surface + (w * h);
                             
                             for (pix = surface; pix < pixend; pix++)
                                A_VAL(pix) = 0xff;