Date: Wednesday, June 19, 2019 @ 16:49:24
  Author: bgyorgy
Revision: 482412

upgpkg: modem-manager-gui 0.0.19.1-4

Fix another crash (FS#62584)

Modified:
  modem-manager-gui/trunk/PKGBUILD
  modem-manager-gui/trunk/fix-crash.patch

-----------------+
 PKGBUILD        |    5 +++--
 fix-crash.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2019-06-19 16:30:08 UTC (rev 482411)
+++ PKGBUILD    2019-06-19 16:49:24 UTC (rev 482412)
@@ -3,7 +3,7 @@
 
 pkgname=modem-manager-gui
 pkgver=0.0.19.1
-pkgrel=3
+pkgrel=4
 pkgdesc="Frontend for ModemManager daemon able to control specific modem 
functions"
 arch=('x86_64')
 url="https://linuxonly.ru/page/modem-manager-gui";
@@ -16,7 +16,7 @@
         fix-crash.patch
         no-indicator.patch)
 sha256sums=('0b9bae29f3cd3d99b3a61d5530097d576a5fa67d3215d54f3570cb20c6ca0bc2'
-            'b690023687614a04206ddecd684224350b75e70599e693703e777dab3412e655'
+            'bcc451c1db096ea1b76907616fecfd14f73baf88b774827b2d1dc6065798ed03'
             '04f85c3d6e7dbf89f5767446a1884f1f45aaea4023a8d07981b819be181849b3')
 
 prepare() {
@@ -23,6 +23,7 @@
   cd $pkgname-$pkgver
 
   # Fix memory corruption because of wrong strsep() usage (FS#61622, FS#61823)
+  # Fix segfault in strftime_l() because of timestamps from future (FS#62584)
   patch -Np1 -i ../fix-crash.patch
 
   # Revert to GTK+ status icon

Modified: fix-crash.patch
===================================================================
--- fix-crash.patch     2019-06-19 16:30:08 UTC (rev 482411)
+++ fix-crash.patch     2019-06-19 16:49:24 UTC (rev 482412)
@@ -86,3 +86,55 @@
                                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)) {
+# HG changeset patch
+# User Alex <[email protected]>
+# Date 1558782045 -10800
+# Node ID 83553d042443c71be71533b6b91ee10f228d935f
+# Parent  de113e8953ae708043823578b64882cfc5a45ca2
+Fix segfault in strftime_l() because of timestamps from future
+
+diff --git a/src/strformat.c b/src/strformat.c
+--- a/src/strformat.c
++++ b/src/strformat.c
+@@ -1,7 +1,7 @@
+ /*
+  *      strformat.c
+  *      
+- *      Copyright 2013-2014 Alex <[email protected]>
++ *      Copyright 2013-2019 Alex <[email protected]>
+  *      
+  *      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;

Reply via email to