discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=f026fdf9b345837d1145f657b2c8ef04765acc60
commit f026fdf9b345837d1145f657b2c8ef04765acc60 Author: Vivek Ellur <vivek.el...@samsung.com> Date: Tue Nov 10 12:26:14 2015 -0500 e: Fix realloc issue in e font module Summary: @Fix Signed-off-by: Vivek Ellur <vivek.el...@samsung.com> Reviewers: zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3306 --- src/bin/e_font.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/e_font.c b/src/bin/e_font.c index e1f4e74..81423ac 100644 --- a/src/bin/e_font.c +++ b/src/bin/e_font.c @@ -159,7 +159,7 @@ _e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, con s1 = strchr(font, ':'); if (s1) { - char *s2, *name, *style; + char *s2, *name, *style, *temp; int len; len = s1 - font; @@ -171,7 +171,13 @@ _e_font_fontconfig_name_parse(Eina_Hash **font_hash, E_Font_Properties *efp, con if (s2) { len = s2 - name; + temp = name; name = realloc(name, sizeof(char) * len + 1); + if (!name) + { + free(temp); + return NULL; + } memset(name, 0, sizeof(char) * len + 1); strncpy(name, font, len); } --