summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-03-11 10:19:29 +0000
committerTom Hacohen <tom@stosb.com>2013-03-11 10:29:30 +0000
commitbd0b8253dc469f5c9268eb3b9744e3eabd90efdf (patch)
treecd496caa5ffca53a3b4e4f0d7fbe84d411f6d46b
parentaf2c73fec27fc864df69e31e3eeaccecf33b9bf8 (diff)
downloadelementary-bd0b8253dc469f5c9268eb3b9744e3eabd90efdf.tar.gz
Entry: Fixed a bug with text appending.
The target buffer was not large enough.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_entry.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 99a016c0a..f5384e2ed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/NEWS b/NEWS
index a525d3d56..1b0a681b4 100644
--- a/NEWS
+++ b/NEWS
@@ -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);