elementary/elm_entry : Fixed a bug. While appending big sized string,

elm_entry_entry_get caused segfault because memcpy could be tried with
NULL pointer + "> 0" length. 


SVN revision: 69829
This commit is contained in:
WooHyun Jung 2012-04-02 00:50:56 +00:00
parent 91d43ae017
commit 440ef74427
1 changed files with 2 additions and 1 deletions

View File

@ -2349,7 +2349,8 @@ _elm_entry_text_get(const Evas_Object *obj, const char *item)
return NULL;
}
memcpy(tmpbuf, text, tlen);
memcpy(tmpbuf + tlen, wd->append_text_left, wd->append_text_len);
if (wd->append_text_left)
memcpy(tmpbuf + tlen, wd->append_text_left, strlen(wd->append_text_len));
tmpbuf[tlen + wd->append_text_len] = '\0';
eina_stringshare_replace(&wd->text, tmpbuf);
free(tmpbuf);