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 670042 - attempt to free uninitialized pointer in get_timezone_cb ()
attempt to free uninitialized pointer in get_timezone_cb ()
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Date and Time
3.2.x
Other Linux
: Normal critical
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-14 09:31 UTC by Alexandre Rostovtsev
Modified: 2012-02-20 10:22 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
proposed patch (983 bytes, patch)
2012-02-14 09:36 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2012-02-14 09:31:07 UTC
In get_timezone_cb() in gnome-control-center-3.2.2's panels/datetime/cc-datetime-panel.c, if the date_time_mechanism_call_get_timezone_finish() call fails, timezone is left uninitialized, and attempting to free it at the end of get_timezone_cb() results in a crash:

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 __GI_abort
    at abort.c line 93
  • #2 __libc_message
    at ../sysdeps/unix/sysv/linux/libc_fatal.c line 198
  • #3 malloc_printerr
  • #4 __GI___libc_free
    at malloc.c line 3738
  • #5 g_free
    at gmem.c line 263
  • #6 get_timezone_cb
    at cc-datetime-panel.c line 589
  • #7 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #8 reply_cb
    at gdbusproxy.c line 2517
  • #9 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #10 g_dbus_connection_call_done
    at gdbusconnection.c line 5229
  • #11 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #12 complete_in_idle_cb
    at gsimpleasyncresult.c line 761
  • #13 g_main_dispatch
    at gmain.c line 2441
  • #14 g_main_context_dispatch
    at gmain.c line 3011
  • #15 g_main_context_iterate
    at gmain.c line 3089
  • #16 g_main_loop_run
    at gmain.c line 3297
  • #17 gtk_main
    at gtkmain.c line 1362
  • #18 g_application_run
    at gapplication.c line 1323
  • #19 main
    at control-center.c line 201

This was reported in Gentoo bugzilla as https://bugs.gentoo.org/show_bug.cgi?id=403527
Comment 1 Alexandre Rostovtsev 2012-02-14 09:36:19 UTC
Created attachment 207514 [details] [review]
proposed patch
Comment 2 Bastien Nocera 2012-02-14 10:59:18 UTC
Review of attachment 207514 [details] [review]:

Looks fine to me.