mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
fixed deadlock scenarion where g_signal_lookup() would be called with the
Fri Oct 27 05:35:14 2000 Tim Janik <timj@gtk.org> * gsignal.c (g_signal_newv): fixed deadlock scenarion where g_signal_lookup() would be called with the signal lock being held. reported by james henstridge. * gclosure.c (g_closure_set_meta_marshal): fixed memcpy/overwrite bug reported by owen.
This commit is contained in:
@@ -161,16 +161,16 @@ g_closure_set_meta_marshal (GClosure *closure,
|
||||
n = CLOSURE_N_NOTIFIERS (closure);
|
||||
notifiers = closure->notifiers;
|
||||
closure->notifiers = g_renew (GClosureNotifyData, NULL, CLOSURE_N_NOTIFIERS (closure) + 1);
|
||||
closure->notifiers[0].data = marshal_data;
|
||||
closure->notifiers[0].notify = (GClosureNotify) meta_marshal;
|
||||
if (notifiers)
|
||||
{
|
||||
/* usually the meta marshal will be setup right after creation, so the
|
||||
* memcpy() should be rare-case scenario
|
||||
* g_memmove() should be rare-case scenario
|
||||
*/
|
||||
memcpy (closure->notifiers + 1, notifiers, CLOSURE_N_NOTIFIERS (closure) * sizeof (notifiers[0]));
|
||||
g_memmove (closure->notifiers + 1, notifiers, CLOSURE_N_NOTIFIERS (closure) * sizeof (notifiers[0]));
|
||||
g_free (notifiers);
|
||||
}
|
||||
closure->notifiers[0].data = marshal_data;
|
||||
closure->notifiers[0].notify = (GClosureNotify) meta_marshal;
|
||||
closure->meta_marshal = 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user