evas: fix use of unitialized data in eet loader.

should fix T1144.
This commit is contained in:
Cedric BAIL 2014-04-02 14:21:59 +09:00
parent 5926aadd9e
commit 4c390fb984
1 changed files with 10 additions and 7 deletions

View File

@ -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;