69aea10936
Glib 2.8 Release notes are here: http://mail.gnome.org/archives/gnome-announce-list/2005-August/msg00048.html
19 lines
639 B
Plaintext
19 lines
639 B
Plaintext
$OpenBSD: patch-glib_gconvert_c,v 1.3 2005/11/13 06:22:03 marcm Exp $
|
|
--- glib/gconvert.c.orig Mon Aug 8 12:50:38 2005
|
|
+++ glib/gconvert.c Tue Aug 23 21:22:07 2005
|
|
@@ -341,10 +341,12 @@ open_converter (const gchar *to_codeset,
|
|
struct _iconv_cache_bucket *bucket;
|
|
gchar *key;
|
|
GIConv cd;
|
|
+ size_t l;
|
|
+ l = strlen (from_codeset) + strlen (to_codeset) + 2;
|
|
|
|
/* create our key */
|
|
- key = g_alloca (strlen (from_codeset) + strlen (to_codeset) + 2);
|
|
- _g_sprintf (key, "%s:%s", from_codeset, to_codeset);
|
|
+ key = g_alloca (l);
|
|
+ _g_snprintf (key, l, "%s:%s", from_codeset, to_codeset);
|
|
|
|
G_LOCK (iconv_cache_lock);
|
|
|