diff -Nru libgweather-3.24.0/debian/changelog libgweather-3.24.0/debian/changelog --- libgweather-3.24.0/debian/changelog 2017-03-23 23:18:57.000000000 +0000 +++ libgweather-3.24.0/debian/changelog 2017-05-26 22:41:01.000000000 +0000 @@ -1,3 +1,12 @@ +libgweather (3.24.0-0ubuntu2.1~zesty1) zesty; urgency=medium + + * debian/patches/git_fix_refcounting_bug_in_GWeatherInfo.patch + - Backport git patch to fix memory corruption that crashes gnome-shell + (LP: #1616651). Should hopefully also fix (LP: #1688208) and a number + of other crashers. + + -- Tim Lunn Sat, 27 May 2017 08:41:01 +1000 + libgweather (3.24.0-0ubuntu2) zesty; urgency=medium * Add git_guard-against-segfault.patch: diff -Nru libgweather-3.24.0/debian/patches/git_fix_refcounting_bug_in_GWeatherInfo.patch libgweather-3.24.0/debian/patches/git_fix_refcounting_bug_in_GWeatherInfo.patch --- libgweather-3.24.0/debian/patches/git_fix_refcounting_bug_in_GWeatherInfo.patch 1970-01-01 00:00:00.000000000 +0000 +++ libgweather-3.24.0/debian/patches/git_fix_refcounting_bug_in_GWeatherInfo.patch 2017-05-26 22:38:31.000000000 +0000 @@ -0,0 +1,65 @@ +From bbe6f7c1c85628336536bcec6684d281656a3739 Mon Sep 17 00:00:00 2001 +From: Giovanni Campagna +Date: Mon, 22 May 2017 08:39:45 -0700 +Subject: Fix refcounting bug in GWeatherInfo + +The return value of find_by_station_code() is transfer none, but +GWeatherInfo would take ownership of it. +--- + libgweather/gweather-weather.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c +index 20b8c58..7d12b04 100644 +--- a/libgweather/gweather-weather.c ++++ b/libgweather/gweather-weather.c +@@ -1992,7 +1992,7 @@ gweather_info_get_value_visibility (GWeatherInfo *info, + + static void + gweather_info_set_location_internal (GWeatherInfo *info, +- GWeatherLocation *location) ++ GWeatherLocation *location) + { + GWeatherInfoPrivate *priv = info->priv; + GVariant *default_loc = NULL; +@@ -2000,26 +2000,31 @@ gweather_info_set_location_internal (GWeatherInfo *info, + gboolean latlon_override = FALSE; + gdouble lat, lon; + ++ if (priv->glocation == location) ++ return; ++ + if (priv->glocation) + gweather_location_unref (priv->glocation); + + priv->glocation = location; + + if (priv->glocation) { +- gweather_location_ref (location); ++ gweather_location_ref (location); + } else { +- GWeatherLocation *world; +- const gchar *station_code; ++ GWeatherLocation *world; ++ const gchar *station_code; + +- default_loc = g_settings_get_value (priv->settings, DEFAULT_LOCATION); ++ default_loc = g_settings_get_value (priv->settings, DEFAULT_LOCATION); + +- g_variant_get (default_loc, "(&s&sm(dd))", &name, &station_code, &latlon_override, &lat, &lon); ++ g_variant_get (default_loc, "(&s&sm(dd))", &name, &station_code, &latlon_override, &lat, &lon); + + if (strcmp(name, "") == 0) + name = NULL; + + world = gweather_location_get_world (); + priv->glocation = gweather_location_find_by_station_code (world, station_code); ++ if (priv->glocation) ++ gweather_location_ref (priv->glocation); + } + + if (priv->glocation) { +-- +cgit v0.12 + + diff -Nru libgweather-3.24.0/debian/patches/series libgweather-3.24.0/debian/patches/series --- libgweather-3.24.0/debian/patches/series 2017-03-23 22:34:05.000000000 +0000 +++ libgweather-3.24.0/debian/patches/series 2017-05-26 22:38:41.000000000 +0000 @@ -1 +1,2 @@ git_guard-against-segfault.patch +git_fix_refcounting_bug_in_GWeatherInfo.patch