raster pushed a commit to branch master.
commit ae2f824413348e764a1b3607829e57ef6e641d89
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Fri Jun 14 19:55:53 2013 +0900
evas: fix possible seg with font glyphs from font instance in glyph array
with no refcounting.
---
src/lib/evas/common/evas_font_draw.c | 3 +++
src/lib/evas/common/evas_text_utils.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/src/lib/evas/common/evas_font_draw.c
b/src/lib/evas/common/evas_font_draw.c
index 7f5b983..7a182f8 100644
--- a/src/lib/evas/common/evas_font_draw.c
+++ b/src/lib/evas/common/evas_font_draw.c
@@ -236,6 +236,7 @@ evas_common_font_glyphs_unref(Evas_Glyph_Array *array)
if (--array->refcount) return;
eina_inarray_free(array->array);
+ evas_common_font_int_unref(array->fi);
free(array);
}
@@ -323,6 +324,8 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props)
if (!text_props->glyphs) goto error;
text_props->glyphs->refcount = 1;
text_props->glyphs->array = glyphs;
+ text_props->glyphs->fi = fi;
+ fi->references++;
}
/* check if there's a request queue in fi, if so ask cserve2 to render
diff --git a/src/lib/evas/common/evas_text_utils.h
b/src/lib/evas/common/evas_text_utils.h
index c24ded6..01411fdf7 100644
--- a/src/lib/evas/common/evas_text_utils.h
+++ b/src/lib/evas/common/evas_text_utils.h
@@ -29,6 +29,7 @@ typedef struct _Evas_Glyph_Array Evas_Glyph_Array;
struct _Evas_Glyph_Array
{
Eina_Inarray *array;
+ void *fi;
unsigned int refcount;
};
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev