mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-15 23:07:16 +01:00
Try to work around segfaults on Solaris if NULL is passed for outbuf...
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)
This commit is contained in:
parent
eccf6b573b
commit
8125388daa
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Mar 20 11:17:32 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
* glib/gfileutils.c (get_contents_regfile): Close the
|
* glib/gfileutils.c (get_contents_regfile): Close the
|
||||||
|
@ -354,11 +354,19 @@ open_converter (const gchar *to_codeset,
|
|||||||
}
|
}
|
||||||
else
|
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;
|
cd = bucket->cd;
|
||||||
bucket->used = TRUE;
|
bucket->used = TRUE;
|
||||||
|
|
||||||
/* reset the descriptor */
|
/* reset the descriptor */
|
||||||
g_iconv (cd, NULL, NULL, NULL, NULL);
|
g_iconv (cd, NULL, &inbytes_left, &outbuf, &outbytes_left);
|
||||||
}
|
}
|
||||||
|
|
||||||
bucket->refcount++;
|
bucket->refcount++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user