From: Hermet Park Date: Wed, 21 Sep 2016 04:32:45 +0000 (+0900) Subject: commit ab1a72f5e7df6fe0adef54bdcddd9867a2ebe3a6 X-Git-Tag: accepted/tizen/common/20160927.152708~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F88871%2F2;p=platform%2Fupstream%2Fefl.git commit ab1a72f5e7df6fe0adef54bdcddd9867a2ebe3a6 Author: Hermet Park Date: Wed Sep 21 13:30:44 2016 +0900 edje/edje_cc: use strncpy() instead of strcpy(). strncpy() is better for security. Also, this change avoids annoying coverity detection. Change-Id: I7e525c0e0d5fcd1411f7079bef1ee7a4fe770728 --- diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c index dfc0e74..3a431ea 100644 --- a/src/bin/edje/edje_cc_parse.c +++ b/src/bin/edje/edje_cc_parse.c @@ -349,7 +349,7 @@ next_token(char *p, char *end, char **new_p, int *delim) l = sscanf(tmpstr, "%*s %i \"%[^\"]\"", &nm, fl); if (l == 2) { - strcpy(file_buf, fl); + strncpy(file_buf, fl, sizeof(file_buf)); line = nm; file_in = file_buf; }