[gnome-db] Patch for bug in gda_value_copy
- From: David Marín Carreño <david aspl es>
- To: gnome-db <gnome-db-list gnome org>
- Subject: [gnome-db] Patch for bug in gda_value_copy
- Date: Tue, 11 Nov 2003 19:58:40 +0100
Hi all.
We have found a little nasty bug :-) in gda_value_copy that made
segfaults when gda_value_free'ing the generated copy.
So in libgda/gda-value.c, in line 966 it was:
case GDA_VALUE_TYPE_NUMERIC :
memcpy (©->value.v_numeric, &value->value.v_numeric, sizeof (GdaNumeric));
break;
But it must be:
case GDA_VALUE_TYPE_NUMERIC :
memcpy (©->value.v_numeric, &value->value.v_numeric, sizeof (GdaNumeric));
copy->value.v_numeric.number = g_strdup (value->value.v_numeric.number);
break;
The string that contains the number must also be copied :-). If it's not
copied, when we free it, we have a problem (haha).
Please, fix it in CVS.
Thanks
--
David Marín Carreño <david aspl es>
Advanced Software Production Line, S.L.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]