GNOME Bugzilla – Bug 72509
Off-by-one in socket code causes segfault
Last modified: 2004-12-22 21:47:04 UTC
In gtksocket.c:372: for (i = socket->accel_group->n_accels; i >= 0; i--) { GtkAccelGroupEntry *accel_entry = &socket->accel_group->priv_accels[i]; I get a segfault just after this (socket->accel_group->priv_accels in NULL) whenever a plug window is destroyed. Surely, if n_accels is zero (it is in my case) then the loop shouldn't run at all? I think 'i = ...->n_accels - 1; i >= 0' would be better...
This has been fixed in CVS: Sun Feb 24 21:18:20 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtksocket.c (gtk_socket_end_embedding): Fix off-by-one error. (Pointed out by Anders Carlsson)
*** Bug 72691 has been marked as a duplicate of this bug. ***
*** Bug 73205 has been marked as a duplicate of this bug. ***
*** Bug 72806 has been marked as a duplicate of this bug. ***