diff -Nru modem-manager-gui-0.0.19.1/debian/changelog modem-manager-gui-0.0.19.1/debian/changelog --- modem-manager-gui-0.0.19.1/debian/changelog 2018-04-07 12:12:18.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/changelog 2019-05-25 14:28:34.000000000 +0200 @@ -1,3 +1,12 @@ +modem-manager-gui (0.0.19.1-2) unstable; urgency=medium + + * Fix memory corruption because of wrong strsep() usage (Closes: #922608) + * Fix segfault in strftime_l() because of timestamps from future + * Use secure URI in debian/watch + * Bump Standards-Version to 4.3.0, no changes + + -- Graham Inggs Sat, 25 May 2019 12:28:34 +0000 + modem-manager-gui (0.0.19.1-1) unstable; urgency=medium * New upstream release diff -Nru modem-manager-gui-0.0.19.1/debian/control modem-manager-gui-0.0.19.1/debian/control --- modem-manager-gui-0.0.19.1/debian/control 2018-04-07 12:00:28.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/control 2019-05-25 14:27:35.000000000 +0200 @@ -11,7 +11,7 @@ libgtkspell3-3-dev, ofono-dev (>= 1.9), po4a -Standards-Version: 4.1.3 +Standards-Version: 4.3.0 Homepage: https://linuxonly.ru/page/modem-manager-gui Vcs-Browser: https://salsa.debian.org/debian/modem-manager-gui Vcs-Git: https://salsa.debian.org/debian/modem-manager-gui.git diff -Nru modem-manager-gui-0.0.19.1/debian/patches/fix-strftime-segfaults.patch modem-manager-gui-0.0.19.1/debian/patches/fix-strftime-segfaults.patch --- modem-manager-gui-0.0.19.1/debian/patches/fix-strftime-segfaults.patch 1970-01-01 02:00:00.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/patches/fix-strftime-segfaults.patch 2019-05-25 14:16:54.000000000 +0200 @@ -0,0 +1,49 @@ +Description: Fix segfault in strftime_l() because of timestamps from future +Origin: upstream, https://bitbucket.org/linuxonly/modem-manager-gui/commits/83553d042443c71be71533b6b91ee10f228d935f +Author: Alex +Last-Update: 2019-05-25 + +--- a/src/strformat.c ++++ b/src/strformat.c +@@ -1,7 +1,7 @@ + /* + * strformat.c + * +- * Copyright 2013-2014 Alex ++ * Copyright 2013-2019 Alex + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -182,18 +182,22 @@ + + memset(buffer, 0, bufsize); + +- if (delta <= 0.0) { +- if (strftime(buffer, bufsize, _("Today, %T"), ftime) == 0) { +- g_snprintf(buffer, bufsize, _("Unknown")); +- } +- } else if ((delta > 0.0) && (delta < 86400.0)) { +- if (strftime(buffer, bufsize, _("Yesterday, %T"), ftime) == 0) { +- g_snprintf(buffer, bufsize, _("Unknown")); ++ if (ftime != NULL) { ++ if (delta <= 0.0) { ++ if (strftime(buffer, bufsize, _("Today, %T"), ftime) == 0) { ++ g_snprintf(buffer, bufsize, _("Unknown")); ++ } ++ } else if ((delta > 0.0) && (delta < 86400.0)) { ++ if (strftime(buffer, bufsize, _("Yesterday, %T"), ftime) == 0) { ++ g_snprintf(buffer, bufsize, _("Unknown")); ++ } ++ } else { ++ if (strftime(buffer, bufsize, _("%d %B %Y, %T"), ftime) == 0) { ++ g_snprintf(buffer, bufsize, _("Unknown")); ++ } + } + } else { +- if (strftime(buffer, bufsize, _("%d %B %Y, %T"), ftime) == 0) { +- g_snprintf(buffer, bufsize, _("Unknown")); +- } ++ g_snprintf(buffer, bufsize, _("Unknown")); + } + + return buffer; diff -Nru modem-manager-gui-0.0.19.1/debian/patches/fix-wrong-strsep-usage.patch modem-manager-gui-0.0.19.1/debian/patches/fix-wrong-strsep-usage.patch --- modem-manager-gui-0.0.19.1/debian/patches/fix-wrong-strsep-usage.patch 1970-01-01 02:00:00.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/patches/fix-wrong-strsep-usage.patch 2019-05-25 14:04:50.000000000 +0200 @@ -0,0 +1,85 @@ +Description: Fix memory corruption because of wrong strsep() usage +Origin: upstream, https://bitbucket.org/linuxonly/modem-manager-gui/commits/6710bf86869852bb8a9946b628eff5bc1019b5aa +Bug-Debian: https://bugs.debian.org/922608 +Author: Alex +Last-Update: 2019-02-23 + +--- a/src/modules/mm06.c ++++ b/src/modules/mm06.c +@@ -1552,10 +1552,12 @@ + GVariantIter *iter; + guint32 locationtype; + GVariant *locationdata; +- gchar *locationstring; + gsize strlength; ++ gchar **fragments; ++ gint i; + GError *error; +- ++ const gint numbases[4] = {10, 10, 16, 16}; ++ + if ((mmguicore == NULL) || (device == NULL)) return FALSE; + mmguicorelc = (mmguicore_t)mmguicore; + +@@ -1578,14 +1580,17 @@ + g_variant_get(data, "(a{uv})", &iter); + while (g_variant_iter_next(iter, "{uv}", &locationtype, &locationdata)) { + if ((locationtype == MODULE_INT_MODEM_LOCATION_CAPABILITY_GSM_LAC_CI) && (locationdata != NULL)) { +- //3GPP location ++ /*3GPP location*/ + strlength = 256; +- locationstring = g_strdup(g_variant_get_string(locationdata, &strlength)); +- device->loc3gppdata[0] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); +- device->loc3gppdata[1] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); +- device->loc3gppdata[2] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); +- device->loc3gppdata[3] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); +- g_free(locationstring); ++ fragments = g_strsplit(g_variant_get_string(locationdata, &strlength), ",", 4); ++ if (fragments != NULL) { ++ i = 0; ++ while ((fragments[i] != NULL) && (i < 4)) { ++ device->loc3gppdata[i] = (guint)strtoul(fragments[i], NULL, numbases[i]); ++ i++; ++ } ++ g_strfreev(fragments); ++ } + g_variant_unref(locationdata); + g_debug("3GPP location: %u, %u, %4x, %4x", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], device->loc3gppdata[3]); + } +--- a/src/modules/mm07.c ++++ b/src/modules/mm07.c +@@ -1659,8 +1659,11 @@ + GVariant *locationdata; + gchar *locationstring; + gsize strlength; ++ gchar **fragments; ++ gint i; + GError *error; +- ++ const gint numbases[4] = {10, 10, 16, 16}; ++ + if ((mmguicore == NULL) || (device == NULL)) return FALSE; + mmguicorelc = (mmguicore_t)mmguicore; + +@@ -1684,12 +1687,15 @@ + if ((locationtype == MODULE_INT_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) && (locationdata != NULL)) { + /*3GPP location*/ + strlength = 256; +- locationstring = g_strdup(g_variant_get_string(locationdata, &strlength)); +- device->loc3gppdata[0] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); +- device->loc3gppdata[1] = (guint)strtol(strsep(&locationstring, ","), NULL, 10); +- device->loc3gppdata[2] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); +- device->loc3gppdata[3] = (guint)strtol(strsep(&locationstring, ","), NULL, 16); +- g_free(locationstring); ++ fragments = g_strsplit(g_variant_get_string(locationdata, &strlength), ",", 4); ++ if (fragments != NULL) { ++ i = 0; ++ while ((fragments[i] != NULL) && (i < 4)) { ++ device->loc3gppdata[i] = (guint)strtoul(fragments[i], NULL, numbases[i]); ++ i++; ++ } ++ g_strfreev(fragments); ++ } + g_variant_unref(locationdata); + g_debug("3GPP location: %u, %u, %4x, %4x\n", device->loc3gppdata[0], device->loc3gppdata[1], device->loc3gppdata[2], device->loc3gppdata[3]); + } else if ((locationtype == MODULE_INT_MODEM_LOCATION_SOURCE_GPS_RAW) && (locationdata != NULL)) { diff -Nru modem-manager-gui-0.0.19.1/debian/patches/series modem-manager-gui-0.0.19.1/debian/patches/series --- modem-manager-gui-0.0.19.1/debian/patches/series 1970-01-01 02:00:00.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/patches/series 2019-05-25 14:16:54.000000000 +0200 @@ -0,0 +1,2 @@ +fix-wrong-strsep-usage.patch +fix-strftime-segfaults.patch diff -Nru modem-manager-gui-0.0.19.1/debian/watch modem-manager-gui-0.0.19.1/debian/watch --- modem-manager-gui-0.0.19.1/debian/watch 2018-04-07 12:00:28.000000000 +0200 +++ modem-manager-gui-0.0.19.1/debian/watch 2019-05-25 14:24:37.000000000 +0200 @@ -1,3 +1,3 @@ version=3 -http://download.tuxfamily.org/gsf/source/ modem-manager-gui-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) +https://download.tuxfamily.org/gsf/source/ modem-manager-gui-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) # Links from http://linuxonly.ru/cms/download.php?list.8 redirect to download.tuxfamily.org