From: Hermet Park Date: Wed, 21 Sep 2016 06:04:39 +0000 (+0900) Subject: commit 06bd8dcf330fe31891475c92aa340d4886f47e2b X-Git-Tag: accepted/tizen/common/20160927.152708~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F88914%2F2;p=platform%2Fupstream%2Fefl.git commit 06bd8dcf330fe31891475c92aa340d4886f47e2b Author: Hermet Park Date: Wed Sep 21 15:03:11 2016 +0900 edje edje_embryo: use strncpy(). This change is not meaningful but avoids an annoying coverity detection. Change-Id: Ia5932564987b4c424794820de4347ae799bb450a --- diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c index c20b2e4..f146a4d 100644 --- a/src/lib/edje/edje_embryo.c +++ b/src/lib/edje/edje_embryo.c @@ -1530,10 +1530,9 @@ _edje_embryo_fn_get_text(Embryo_Program *ep, Embryo_Cell *params) } else { - char *ss; - - ss = alloca(strlen(s) + 1); - strcpy(ss, s); + int size = strlen(s) + 1; + char *ss = alloca(size); + strncpy(ss, s, size); ss[params[3] - 1] = 0; SETSTR(ss, params[2]); }