mirror of https://github.com/GNOME/gimp.git
NULL-terminate all strings coming in over the wire protocol. Should help
2007-12-11 Sven Neumann <sven@gimp.org> * libgimpbase/gimpwire.c (_gimp_read_read_string): NULL-terminate all strings coming in over the wire protocol. Should help with bug #498207. svn path=/trunk/; revision=24312
This commit is contained in:
parent
40f237269c
commit
09cca4bf9a
|
@ -1,3 +1,9 @@
|
|||
2007-12-11 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpbase/gimpwire.c (_gimp_read_read_string): NULL-terminate
|
||||
all strings coming in over the wire protocol. Should help with bug
|
||||
#498207.
|
||||
|
||||
2007-12-10 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/pygimp/gimpmodule.c (pygimp_set_background)
|
||||
|
|
|
@ -433,12 +433,16 @@ _gimp_wire_read_string (GIOChannel *channel,
|
|||
if (tmp > 0)
|
||||
{
|
||||
data[i] = g_new (gchar, tmp);
|
||||
|
||||
if (! _gimp_wire_read_int8 (channel,
|
||||
(guint8 *) data[i], tmp, user_data))
|
||||
{
|
||||
g_free (data[i]);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* make sure that the string is NULL-terminated */
|
||||
data[i][tmp - 1] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue