+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
+Wed Mar 20 18:20:21 2002 Owen Taylor <otaylor@redhat.com>
+
+ * glib/gconvert.c (open_converter): Try to work around segfaults
+ on Solaris if NULL is passed for outbuf... supposedly gchar
+ *outbuf = NULL... &outbuf works. (#74336, Lauri Alanko)
+
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
* glib/gfileutils.c (get_contents_regfile): Close the
}
else
{
+ /* Apparently iconv on Solaris <= 7 segfaults if you pass in
+ * NULL for anything but inbuf; work around that. (NULL outbuf
+ * or NULL *outbuf is allowed by Unix98.)
+ */
+ gint inbytes_left = 0;
+ gchar *outbuf = NULL;
+ gint outbytes_left = 0;
+
cd = bucket->cd;
bucket->used = TRUE;
/* reset the descriptor */
- g_iconv (cd, NULL, NULL, NULL, NULL);
+ g_iconv (cd, NULL, &inbytes_left, &outbuf, &outbytes_left);
}
bucket->refcount++;