summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2005-11-23 15:32:45 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2005-11-23 15:32:45 +0000
commita6285ac07822ac8c74b00bcadc8861b9ca5eff3d (patch)
treeadf730b422677f787d5e2b143a5652f3e9d91be6
parentbdb64d0399a33132a94fea861ac7b5bacf906ce0 (diff)
downloadpango-a6285ac07822ac8c74b00bcadc8861b9ca5eff3d.tar.gz
Fix incorrect bounds check. (#316469, Steve Grubb) Moreover, increase
2005-11-23 Behdad Esfahbod <behdad@gnome.org> * modules/hangul/hangul-fc.c (hangul_engine_shape): Fix incorrect bounds check. (#316469, Steve Grubb) Moreover, increase max_jamos eight at a time instead of three.
-rw-r--r--ChangeLog6
-rw-r--r--modules/hangul/hangul-fc.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1e44c6dc..37fbac33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+ * modules/hangul/hangul-fc.c (hangul_engine_shape): Fix incorrect
+ bounds check. (#316469, Steve Grubb) Moreover, increase max_jamos
+ eight at a time instead of three.
+
+2005-11-23 Behdad Esfahbod <behdad@gnome.org>
+
Protect against possible division by zeros (#316468, Steve Grubb)
* pango/pango-context.c (update_metrics_from_items),
diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c
index ad7a239a..de1b4768 100644
--- a/modules/hangul/hangul-fc.c
+++ b/modules/hangul/hangul-fc.c
@@ -346,9 +346,9 @@ hangul_engine_shape (PangoEngineShape *engine,
}
}
- if (n_jamos == max_jamos)
+ if (n_jamos >= max_jamos - 3)
{
- max_jamos += 3; /* at most 3 for each syllable code (L+V+T) */
+ max_jamos += 8; /* at most 3 for each syllable code (L+V+T) */
if (jamos == jamos_static)
{
jamos = g_new (gunichar, max_jamos);