iconv_inconvenience and ndr_print_*
Jelmer Vernooij
jelmer at samba.org
Fri Jun 12 00:29:35 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Tridge,
tridge at samba.org wrote:
> The ndr_print_*() functions can end up calling string conversions via
> ndr_size_*() functions which call ndr_push functions, which call
> string conversion.
>
> Unfortunately ndr_print_*() functions create their own "struct
> ndr_print" structures, and don't setup ndr->iconv_convenience. So it
> segfaults when the first structure with a string is run through a
> ndr_size call.
>
> My fix at the moment is below, but I suspect you may want a different
> approach.
Ideally we should be specifying the iconv convenience to all of these
functions, but I'm not sure how doable that is given the large number of
callers.
Your patch is a step forward at least (crashing is bad :-), we can
always change the callers to explicitly specify an iconv convenience later.
Cheers,
Jelmer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iJwEAQECAAYFAkoxoW0ACgkQDLQl4QYPZuWUqwP/X260cN9dLVSaJgKd45bOcfyT
PPtgS6aJUTT+JI6RyAzja7Bd6svUVYDwmrz2FC/QydcloVdPpZRYdy1WSt41wJ6B
ZNxuF4+JfLXG5JgZLxtXvllRJxg/JhMqUHxWqzn6CUUDI/SyqexMaXslgUC+yqYt
3K6ojtptsMYWUwpmapI=
=5UyP
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list