From f809ca7c11b61c067d6ea7bea5ce04ec602d1f3d Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 19 Nov 1998 04:52:26 +0000 Subject: [PATCH] Fix for g_datalist_id_set_full() use (error is deeper down, some internal Fix for g_datalist_id_set_full() use (error is deeper down, some internal funcs weren't checking that things were initialized.) --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gdataset.c | 3 +++ glib/gdataset.c | 3 +++ 10 files changed, 70 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2db51030e..63f4d0a6e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Nov 18 1998 Elliot Lee + . gdataset.c: There was a code path into g_data_set_internal + through a function (g_datalist_id_set_full). Neither function + checked for g_dataset_init having been run, but + g_data_set_internal used the memchunk. I added + a check into g_data_set_internal so it will do the + initialization if needed. (There's probably a better way.) + Mon Nov 16 07:48:06 1998 Tim Janik * glib.h (g_bit_nth_msf): fixed off-by-one error, so we don't waste diff --git a/gdataset.c b/gdataset.c index 35c7be821..c62a8cdaa 100644 --- a/gdataset.c +++ b/gdataset.c @@ -174,6 +174,9 @@ g_data_set_internal (GData **datalist, { register GData *list; + if (!g_dataset_location_ht) + g_data_initialize (); + list = *datalist; if (!data) { diff --git a/glib/gdataset.c b/glib/gdataset.c index 35c7be821..c62a8cdaa 100644 --- a/glib/gdataset.c +++ b/glib/gdataset.c @@ -174,6 +174,9 @@ g_data_set_internal (GData **datalist, { register GData *list; + if (!g_dataset_location_ht) + g_data_initialize (); + list = *datalist; if (!data) { -- 2.34.1