Properly nul-terminate return values from g_convert()
authorBenjamin Otte <otte@gnome.org>
Wed, 28 Oct 2009 18:18:20 +0000 (19:18 +0100)
committerBenjamin Otte <otte@gnome.org>
Wed, 28 Oct 2009 18:26:17 +0000 (19:26 +0100)
commit4288ad76922da01d1f452c6c257e97008b16aaf0
tree0a78c86b7fb25aed91790391981e79697de8c042
parent5a633f82dbbce067c56fba0ee372fd341b76368d
Properly nul-terminate return values from g_convert()

The patch ensures that multibyte character sets are properly
nul-terminated. This is an issue because the documentation claims to
return a "nul-terminated" string and users of the API assume that means
a proper nul-termination in the resulting character set.

I looked at Pidgin and GStreamer code and found at least 3 cases where
this was happening.

This patch also reverts the documentation change from
5a633f82dbbce067c56fba0ee372fd341b76368d as that is now no longer
necessary.
glib/gconvert.c