After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686446 - Use-after-free in weather_info_setup_tooltip()
Use-after-free in weather_info_setup_tooltip()
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-19 08:33 UTC by Milan Crha
Modified: 2012-10-19 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Crha 2012-10-19 08:33:06 UTC
Extracting this from bug #683406:

Valgrind claims use-after-free in weather_info_setup_tooltip():

Invalid read of size 1
   at 0x4C2A051: __GI_strcmp (mc_replace_strmem.c:712)
   by 0x1C79893F: weather_info_setup_tooltip (clock-location-tile.c:621)
   by 0x1C790CE8: weather_tooltip (clock.c:1375)
   by 0x5A0AE00: _gtk_marshal_BOOLEAN__INT_INT_BOOLEAN_OBJECT
   by 0x78E7723: g_closure_invoke (gclosure.c:777)
   by 0x78F87AF: signal_emit_unlocked_R (gsignal.c:3547)
   by 0x790034A: g_signal_emit_valist (gsignal.c:3306)
   by 0x7900DCF: g_signal_emit_by_name (gsignal.c:3389)
   by 0x5AEBBAF: gtk_tooltip_run_requery (gtktooltip.c:987)
   by 0x5AECD05: _gtk_tooltip_handle_event (gtktooltip.c:1657)
   by 0x5A07D17: gtk_main_do_event (gtkmain.c:1765)
   by 0x5F5C001: gdk_event_source_dispatch (gdkeventsource.c:358)
   by 0x7B70204: g_main_context_dispatch (gmain.c:2539)
   by 0x7B70537: g_main_context_iterate.isra.23 (gmain.c:3146)
   by 0x7B70931: g_main_loop_run (gmain.c:3340)
   by 0x5A072D4: gtk_main (gtkmain.c:1161)
   by 0x424E9E: main (main.c:117)
 Address 0x1a920130 is 0 bytes inside a block of size 9 free'd
   at 0x4C27D4E: free (vg_replace_malloc.c:427)
   by 0x1C798911: weather_info_setup_tooltip (clock-location-tile.c:618)
   by 0x1C790CE8: weather_tooltip (clock.c:1375)
   by 0x5A0AE00: _gtk_marshal_BOOLEAN__INT_INT_BOOLEAN_OBJECT
   by 0x78E7723: g_closure_invoke (gclosure.c:777)
   by 0x78F87AF: signal_emit_unlocked_R (gsignal.c:3547)
   by 0x790034A: g_signal_emit_valist (gsignal.c:3306)
   by 0x7900DCF: g_signal_emit_by_name (gsignal.c:3389)
   by 0x5AEBBAF: gtk_tooltip_run_requery (gtktooltip.c:987)
   by 0x5AECD05: _gtk_tooltip_handle_event (gtktooltip.c:1657)
   by 0x5A07D17: gtk_main_do_event (gtkmain.c:1765)
   by 0x5F5C001: gdk_event_source_dispatch (gdkeventsource.c:358)
   by 0x7B70204: g_main_context_dispatch (gmain.c:2539)
   by 0x7B70537: g_main_context_iterate.isra.23 (gmain.c:3146)
   by 0x7B70931: g_main_loop_run (gmain.c:3340)
   by 0x5A072D4: gtk_main (gtkmain.c:1161)
   by 0x424E9E: main (main.c:117)
Comment 1 Milan Crha 2012-10-19 13:03:37 UTC
This one is fixed in current master.

618	g_free (apparent);
619
620	wind = weather_info_get_wind (info);
621     if (strcmp (apparent, dgettext ("gnome-applets-2.0", "Unknown")) != 0)