From: raster Date: Mon, 8 Aug 2011 14:40:33 +0000 (+0000) Subject: strndup--! X-Git-Tag: 2.0_alpha~240^2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed820844b167801040a5f87b9d1955512e3adec1;p=framework%2Fuifw%2Fevas.git strndup--! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@62206 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_font_dir.c b/src/lib/canvas/evas_font_dir.c index 62d6641..52108f6 100644 --- a/src/lib/canvas/evas_font_dir.c +++ b/src/lib/canvas/evas_font_dir.c @@ -715,10 +715,10 @@ evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Eva end = strchr(start, ','); if (end) { - char *tmp; - tmp = strndup(start, end - start); + char *tmp = alloca((end - start) + 1); + strncpy(tmp, start, end - start); + tmp[end - start] = 0; FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start); - free(tmp); } else {