summaryrefslogtreecommitdiff
path: root/pango/pango-script.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-12-08 21:03:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-12-08 21:03:25 +0000
commitf33287b277ad7ba82ba5c0a4a43024d9f7b78fbb (patch)
treee6914d10fb917688a45fba9a510aabf88e88f59f /pango/pango-script.c
parentc2d6a3e80e92d1f58e7d7649174d884ff96e7b00 (diff)
downloadpango-f33287b277ad7ba82ba5c0a4a43024d9f7b78fbb.tar.gz
=== Released 1.3.1 ===PANGO_1_3_1
Mon Dec 8 12:57:03 2003 Owen Taylor <otaylor@redhat.com> * === Released 1.3.1 === * NEWS: Further updates for 1.3.1 * pango/pango-script.c (pango_script_iter_next): Put in a hopefully-correct fix for a problem with invalid values of start_sp causing out-of-bounds writes. (#125928, Morten Welinder)
Diffstat (limited to 'pango/pango-script.c')
-rw-r--r--pango/pango-script.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pango/pango-script.c b/pango/pango-script.c
index c489a2e7..0de2edaa 100644
--- a/pango/pango-script.c
+++ b/pango/pango-script.c
@@ -327,10 +327,12 @@ pango_script_iter_next (PangoScriptIter *iter)
* if this character is a close paired character,
* pop it from the stack
*/
- if (pair_index >= 0 && !IS_OPEN (pair_index) != 0 && iter->paren_sp >= 0)
+ if (pair_index >= 0 && !IS_OPEN (pair_index) && iter->paren_sp >= 0)
{
iter->paren_sp--;
- start_sp--;
+
+ if (iter->paren_sp < start_sp)
+ start_sp = iter->paren_sp;
}
}
else