diff options
author | Pacho Ramos <pacho@gentoo.org> | 2011-02-02 19:00:19 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2011-02-02 19:00:19 +0000 |
commit | f5a704c610e8b14e124010563da3fa1492b4fd28 (patch) | |
tree | 02ef0a934fd33621e2b59299125c1be6005eba94 /x11-libs/gtk+extra/files | |
parent | Version bump (diff) | |
download | gentoo-2-f5a704c610e8b14e124010563da3fa1492b4fd28.tar.gz gentoo-2-f5a704c610e8b14e124010563da3fa1492b4fd28.tar.bz2 gentoo-2-f5a704c610e8b14e124010563da3fa1492b4fd28.zip |
Fix crashes with dev-embedded/gpsim (bug #353489 by Robert Pearce).
(Portage version: 2.1.9.35/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/gtk+extra/files')
-rw-r--r-- | x11-libs/gtk+extra/files/gtk+extra-2.1.2-itementry-crash.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/x11-libs/gtk+extra/files/gtk+extra-2.1.2-itementry-crash.patch b/x11-libs/gtk+extra/files/gtk+extra-2.1.2-itementry-crash.patch new file mode 100644 index 000000000000..56a9786161db --- /dev/null +++ b/x11-libs/gtk+extra/files/gtk+extra-2.1.2-itementry-crash.patch @@ -0,0 +1,17 @@ +--- gtkextra/gtkitementry.c 2011-02-02 13:36:17.402632207 +1100 ++++ gtkextra/gtkitementry.c 2011-02-02 17:20:26.305418034 +1100 +@@ -778,11 +778,12 @@ + memcpy (entry->text + index, new_text, new_text_length); + #endif //GTK_TYPE_ENTRY_BUFFER + +- ientry->item_n_bytes += new_text_length; +- entry->text_length += n_chars; ++ if (new_text_length + *position > ientry->item_n_bytes) ++ ientry->item_n_bytes = new_text_length + *position; + + /* NUL terminate for safety and convenience */ + entry->text[ientry->item_n_bytes] = '\0'; ++ entry->text_length = strlen(entry->text); + + if (entry->current_pos > *position) + entry->current_pos += n_chars; |