summaryrefslogtreecommitdiff
path: root/modules/indic/gujarati-x.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-12-18 17:34:23 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-12-18 17:34:23 +0000
commitb94d0634798ad6f70dfda610c26b3621ae02dc21 (patch)
tree53e37ab314b96d1a795e46d859f44a9b62c254cd /modules/indic/gujarati-x.c
parent01b5c66858b8253c62b51760aef8ba1c8ad18e64 (diff)
downloadpango-b94d0634798ad6f70dfda610c26b3621ae02dc21.tar.gz
Syllable array needs to start at length 2, not 1. Also, some cleanups.
Tue Dec 18 12:33:03 2001 Owen Taylor <otaylor@redhat.com> * modules/indic/*-x.c (pango_engine_shape): Syllable array needs to start at length 2, not 1. Also, some cleanups. (Memory overrun reported by Joshua Pritikin #66850)
Diffstat (limited to 'modules/indic/gujarati-x.c')
-rw-r--r--modules/indic/gujarati-x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/indic/gujarati-x.c b/modules/indic/gujarati-x.c
index 47599b55..1a998b88 100644
--- a/modules/indic/gujarati-x.c
+++ b/modules/indic/gujarati-x.c
@@ -236,7 +236,7 @@ pango_indic_engine_shape (PangoFont * font,
gunichar *wc;
int sb;
int n_syls;
- gunichar **syls = g_malloc (sizeof (gunichar **));
+ gunichar **syls = g_new (gunichar *, 2);
g_return_if_fail (font != NULL);
g_return_if_fail (text != NULL);
@@ -263,7 +263,7 @@ pango_indic_engine_shape (PangoFont * font,
if (i && (is_consonant (wc[i]) | is_ind_vowel (wc[i]))
&& wc[i - 1] != VIRAMA)
{
- syls = g_realloc (syls, ((n_syls + 2) * sizeof (gunichar **)));
+ syls = g_renew (gunichar *, syls, n_syls + 2);
syls[n_syls] = wc + i;
n_syls++;
sb = glyphs->log_clusters[i];