diff options
author | Tom Hacohen <tom@stosb.com> | 2013-03-11 10:19:29 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2013-03-11 10:29:30 +0000 |
commit | bd0b8253dc469f5c9268eb3b9744e3eabd90efdf (patch) | |
tree | cd496caa5ffca53a3b4e4f0d7fbe84d411f6d46b | |
parent | af2c73fec27fc864df69e31e3eeaccecf33b9bf8 (diff) | |
download | elementary-bd0b8253dc469f5c9268eb3b9744e3eabd90efdf.tar.gz |
Entry: Fixed a bug with text appending.
The target buffer was not large enough.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/lib/elm_entry.c | 4 |
3 files changed, 8 insertions, 1 deletions
@@ -766,3 +766,7 @@ 2013-03-02 Brian J. Lovin * Fix initial value of the spinner on the first mouse move. + +2013-03-11 Tom Hacohen (TAsn) + + * Entry: Fixed a bug with text appending. @@ -22,6 +22,7 @@ Fixes: * Fix elm_progressbar_pulse() to abort if pulsing not enabled * Fix scroller acceleration bug. It was accelerated even it's scrolled after finishing the previous scroll. This happens with page scroll enabled. * Fix initial value of the spinner on the first mouse move. + * Entry: Fixed a bug with text appending. Elementary 1.7.5 diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 8684a7049..793232433 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -2429,7 +2429,9 @@ _elm_entry_text_get(const Evas_Object *obj, const char *item) char *tmpbuf; size_t tlen; tlen = strlen(text); - tmpbuf = malloc(wd->append_text_len + 1); + /* FIXME: need that or we do copy unitialised data */ + tmpbuf = calloc(1, tlen + sd->append_text_len - + sd->append_text_position + 1); if (!tmpbuf) { ERR("Failed to allocate memory for entry's text %p", obj); |