cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d3bc06ae33320f07d6448fc114ce488e785686f1
commit d3bc06ae33320f07d6448fc114ce488e785686f1 Author: Cedric BAIL <cedric.b...@samsung.com> Date: Thu Mar 13 10:57:38 2014 +0900 evas: simplify path logic and make backend code more robust. Fix CID 1039665. --- src/lib/evas/canvas/evas_font_dir.c | 2 +- src/lib/evas/common/evas_font_load.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_font_dir.c b/src/lib/evas/canvas/evas_font_dir.c index a4d59bc..1eed53a 100644 --- a/src/lib/evas/canvas/evas_font_dir.c +++ b/src/lib/evas/canvas/evas_font_dir.c @@ -633,7 +633,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, const char *source, int fsize = 0; fdata = eet_read(ef, nm, &fsize); - if ((fdata) && (fsize > 0)) + if (fdata) { font = evas->engine.func->font_memory_load(evas->engine.data.output, source, nm, size, fdata, fsize, wanted_rend); free(fdata); diff --git a/src/lib/evas/common/evas_font_load.c b/src/lib/evas/common/evas_font_load.c index 8b1991e..92fdd24 100644 --- a/src/lib/evas/common/evas_font_load.c +++ b/src/lib/evas/common/evas_font_load.c @@ -135,6 +135,7 @@ evas_common_font_source_memory_load(const char *name, const void *data, int data RGBA_Font_Source *fs; assert(name != NULL); + if (data_size <= 0) return NULL; fs = calloc(1, sizeof(RGBA_Font_Source) + data_size); if (!fs) return NULL; fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source); --