edje: let's be more careful with string.

Fix CID 1193213.
This commit is contained in:
Cedric BAIL 2014-03-20 16:51:48 +09:00
parent fe2948be08
commit f26b370584
1 changed files with 2 additions and 1 deletions

View File

@ -7654,7 +7654,8 @@ _edje_generate_source_of_part(Evas_Object *obj, Edje_Part *ep, Eina_Strbuf *buf)
char state[512], *delim;
double value;
strncpy(state, data, sizeof(state) - 1); /* if we go over it, too bad.. the list of states may need to change to provide name and value separated */
delim = strchr(state, ' ');
delim = strchr(state, ' ');
if (!delim) continue;
*delim = '\0';
delim++;
value = strtod(delim, NULL);