gnome-panel reads free memory in panel_object_loader_stop_loading
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-panel (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Running valgrind on gnome-panel I noticed:
==4781== Invalid read of size 1
==4781== at 0x4C29FEE: strcmp (mc_replace_
==4781== by 0x45C297: panel_object_
==4781== by 0x45C947: panel_object_
==4781== by 0x7515B6C: g_main_
==4781== by 0x7516367: g_main_
==4781== by 0x75168A1: g_main_loop_run (gmain.c:3297)
==4781== by 0x55E389C: gtk_main (gtkmain.c:1367)
==4781== by 0x4220EE: main (main.c:117)
==4781== Address 0x17262f40 is 0 bytes inside a block of size 9 free'd
==4781== at 0x4C282E0: free (vg_replace_
==4781== by 0x45C12B: free_object_to_load (panel-
==4781== by 0x45C271: panel_object_
==4781== by 0x45C947: panel_object_
==4781== by 0x7515B6C: g_main_
==4781== by 0x7516367: g_main_
==4781== by 0x75168A1: g_main_loop_run (gmain.c:3297)
==4781== by 0x55E389C: gtk_main (gtkmain.c:1367)
==4781== by 0x4220EE: main (main.c:117)
==4781==
The code is:
void
panel_object_
{
GSList *l;
for (l = panel_objects_
if (g_strcmp0 (object->id, id) == 0)
}
if (l != NULL) {
}
for (l = panel_objects_
if (g_strcmp0 (object->id, id) == 0)
}
if (l != NULL) {
}
if (panel_
}
free_object_to_load (object) gets called only 5 lines before strcmp on the same object.
tags: | added: oneiric |