summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-05-27 23:24:44 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-05-27 23:24:44 +0000
commit3ec3c482689837c48e633ed9ec35d2ce0334c47a (patch)
tree6567d8a1c9ec82912ec40b5ccb0d80c61794e2fe
parent7107fef1549f6c907ea508dff46092c1e4eace67 (diff)
downloadpango-3ec3c482689837c48e633ed9ec35d2ce0334c47a.tar.gz
Limit the size of the buffers we alloca(). (#104238)
Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com> * pango/mini-fribidi/fribidi.c (fribidi_analyse_string): Limit the size of the buffers we alloca(). (#104238)
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-1-105
-rw-r--r--ChangeLog.pre-1-45
-rw-r--r--ChangeLog.pre-1-65
-rw-r--r--ChangeLog.pre-1-85
-rw-r--r--pango/mini-fribidi/fribidi.c11
6 files changed, 35 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ff3f5e2b..b1e9bd31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mini-fribidi/fribidi.c (fribidi_analyse_string):
+ Limit the size of the buffers we alloca(). (#104238)
+
Tue May 27 16:51:32 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Clean up so that tests for Xft/FreeType
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index ff3f5e2b..b1e9bd31 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,8 @@
+Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mini-fribidi/fribidi.c (fribidi_analyse_string):
+ Limit the size of the buffers we alloca(). (#104238)
+
Tue May 27 16:51:32 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Clean up so that tests for Xft/FreeType
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index ff3f5e2b..b1e9bd31 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,8 @@
+Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mini-fribidi/fribidi.c (fribidi_analyse_string):
+ Limit the size of the buffers we alloca(). (#104238)
+
Tue May 27 16:51:32 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Clean up so that tests for Xft/FreeType
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index ff3f5e2b..b1e9bd31 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,8 @@
+Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mini-fribidi/fribidi.c (fribidi_analyse_string):
+ Limit the size of the buffers we alloca(). (#104238)
+
Tue May 27 16:51:32 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Clean up so that tests for Xft/FreeType
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index ff3f5e2b..b1e9bd31 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,8 @@
+Tue May 27 18:37:44 2003 Owen Taylor <otaylor@redhat.com>
+
+ * pango/mini-fribidi/fribidi.c (fribidi_analyse_string):
+ Limit the size of the buffers we alloca(). (#104238)
+
Tue May 27 16:51:32 2003 Owen Taylor <otaylor@redhat.com>
* configure.in: Clean up so that tests for Xft/FreeType
diff --git a/pango/mini-fribidi/fribidi.c b/pango/mini-fribidi/fribidi.c
index e8c4c10f..27b5d9f8 100644
--- a/pango/mini-fribidi/fribidi.c
+++ b/pango/mini-fribidi/fribidi.c
@@ -586,12 +586,21 @@ fribidi_analyse_string ( /* input */
/* Determinate character types */
DBG (" Determine character types\n");
{
- FriBidiCharType* char_type = g_alloca (len*sizeof(FriBidiCharType));
+ FriBidiCharType* char_type;
+
+ if (len < 512)
+ char_type = g_alloca (len*sizeof(FriBidiCharType));
+ else
+ char_type = g_malloc (len*sizeof(FriBidiCharType));
+
for (i = 0; i < len; i++)
char_type[i] = _pango_fribidi_get_type (str[i]);
/* Run length encode the character types */
type_rl_list = run_length_encode_types (char_type, len);
+
+ if (len >= 512)
+ g_free (char_type);
}
DBG (" Determine character types, Done\n");