tasn pushed a commit to branch elementary-1.7.
commit bd0b8253dc469f5c9268eb3b9744e3eabd90efdf
Author: Tom Hacohen <[email protected]>
Date: Mon Mar 11 10:19:29 2013 +0000
Entry: Fixed a bug with text appending.
The target buffer was not large enough.
---
ChangeLog | 4 ++++
NEWS | 1 +
src/lib/elm_entry.c | 4 +++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 99a016c..f5384e2 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 a525d3d..1b0a681 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 8684a70..7932324 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);
--
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the
endpoint security space. For insight on selecting the right partner to
tackle endpoint security challenges, access the full report.
http://p.sf.net/sfu/symantec-dev2dev