Re: iconv

Miroslaw Dobrzanski-Neumann <mne mosaic-ag com> writes:

> Hi,
> I've just get glib compiled on solaris. Running unicode-encoding test I got SEGV
> in the following context
> I'm using Sun implementation of iconv from
> in gconvert.c
> =============
> open_converter ()
> {
> 	...
> 	g_iconv (cd, NULL, NULL, NULL, NULL);
> 	...
> }
> The SEGV is due to NULL pointer passed to iconv. The iconv man page explicitly
> allows only the inbuf pointer to be null.

Put a workaround for this in CVS a few days ago:

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)

Note that recent versions of Solaris have changed behavior to conform
to SUSv2 / POSIX, where NULL outbuf is allowed.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]