cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4c390fb984a71d2578a5ea676704d7ea6de9f173

commit 4c390fb984a71d2578a5ea676704d7ea6de9f173
Author: Cedric BAIL <cedric.b...@free.fr>
Date:   Wed Apr 2 14:21:59 2014 +0900

    evas: fix use of unitialized data in eet loader.
    
    should fix T1144.
---
 src/modules/evas/loaders/eet/evas_image_load_eet.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/modules/evas/loaders/eet/evas_image_load_eet.c 
b/src/modules/evas/loaders/eet/evas_image_load_eet.c
index 1b518b3..6fe6299 100644
--- a/src/modules/evas/loaders/eet/evas_image_load_eet.c
+++ b/src/modules/evas/loaders/eet/evas_image_load_eet.c
@@ -77,7 +77,7 @@ evas_image_load_file_head_eet(void *loader_data,
    Evas_Loader_Internal *loader = loader_data;
    int       a, compression, quality;
    Eet_Image_Encoding lossy;
-   const Eet_Colorspace *cspaces;
+   const Eet_Colorspace *cspaces = NULL;
    int       ok;
 
    ok = eet_data_image_header_read(loader->ef, loader->key,
@@ -91,12 +91,15 @@ evas_image_load_file_head_eet(void *loader_data,
      {
         unsigned int i;
 
-        for (i = 0; cspaces[i] != EET_COLORSPACE_ARGB8888; i++)
-          if (cspaces[i] == EET_COLORSPACE_ETC1)
-            {
-               prop->cspaces = cspaces_etc1;
-               break;
-            }
+       if (cspaces != NULL)
+         {
+           for (i = 0; cspaces[i] != EET_COLORSPACE_ARGB8888; i++)
+             if (cspaces[i] == EET_COLORSPACE_ETC1)
+               {
+                 prop->cspaces = cspaces_etc1;
+                 break;
+               }
+         }
      }
 
    prop->alpha = !!a;

-- 


Reply via email to