summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2005-11-23 15:32:59 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2005-11-23 15:32:59 +0000
commit799bb9223ff72ce266c82b91ea18defa10b33086 (patch)
treef3c156f79f287066b1e1d9c17ef3f204ab159b36
parenta775a8b1b6ddf7b7ca3e5ba649db7d766f99762f (diff)
downloadpango-799bb9223ff72ce266c82b91ea18defa10b33086.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 f7aaf7d3..0ecd492b 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 26485b8b..9ab0fbc3 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);