summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2005-11-01 17:20:41 +0000
committerBill Haneman <billh@src.gnome.org>2005-11-01 17:20:41 +0000
commitec5ac1c6d58b791eb8c8069fb329baf37c1ed8a0 (patch)
treee70e84bc1477870f897098366696dcae00c3637e
parent69940ef016e1825e26ab48cbbaf635c94adc31c0 (diff)
downloadvte-ec5ac1c6d58b791eb8c8069fb329baf37c1ed8a0.tar.gz
Fix for crasher bug #153405. Patch from Padraig O'Briain.
-rw-r--r--ChangeLog8
-rw-r--r--src/vteaccess.c9
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a3d3596a..5cf080c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-01 Bill Haneman <billh@gnome.org>
+
+ * src/vteaccess.c:
+ (vte_terminal_accessible_get_text):
+ Swap offsets if start > end; fixes crasher
+ bug #153405. Patch from padraig o'briain,
+ thanks to Kjartan for review.
+
2005-10-02 Kjartan Maraas <kmaraas@gnome.org>
* src/vtebg.c: (_vte_property_get_pixmaps):
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 360d92f9..22964ca5 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -922,6 +922,15 @@ vte_terminal_accessible_get_text(AtkText *text,
int start, end;
gchar *ret;
+ /* Swap around if start is greater than end */
+ if (start_offset > end_offset) {
+ gint tmp;
+
+ tmp = start_offset;
+ start_offset = end_offset;
+ end_offset = tmp;
+ }
+
g_return_val_if_fail((start_offset >= 0) && (end_offset >= -1),
g_strdup(""));