weather applet prefs crash due to incorrect use of g_settings_get ()

Bug #1071883 reported by Marcus Comstedt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-applets (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The function compare_location() in gweather-pref.c contains the following call:

    g_settings_get (pref->priv->applet->lib_settings, "default-location", "(ssm(dd))",
      &default_loc, NULL, NULL);

This format string requires 5 pointers to be provided, but only 3 are given. Beacuse if this, g_settings_get will use random stack data as pointers, and corrupt memory causing a crash.

Adding 2 more NULL pointers fixes the problem:

    g_settings_get (pref->priv->applet->lib_settings, "default-location", "(ssm(dd))",
      &default_loc, NULL, NULL, NULL, NULL);

Version 3.5.92-0ubuntu1, quantal.

Tags: patch
Changed in gnome-applets (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.