pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/x11/wmweather



Module Name:    pkgsrc
Committed By:   dholland
Date:           Sat Jul 10 17:13:44 UTC 2021

Modified Files:
        pkgsrc/x11/wmweather: Makefile distinfo
        pkgsrc/x11/wmweather/patches: patch-wmweather.c

Log Message:
x11/wmweather: apply patch from Romain Dolbeau in PR 55284.

Fixes time_t abuse leading to crashes on 32-bit platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 pkgsrc/x11/wmweather/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/x11/wmweather/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/x11/wmweather/patches/patch-wmweather.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/wmweather/Makefile
diff -u pkgsrc/x11/wmweather/Makefile:1.66 pkgsrc/x11/wmweather/Makefile:1.67
--- pkgsrc/x11/wmweather/Makefile:1.66  Wed Apr 21 13:25:33 2021
+++ pkgsrc/x11/wmweather/Makefile       Sat Jul 10 17:13:44 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.66 2021/04/21 13:25:33 adam Exp $
+# $NetBSD: Makefile,v 1.67 2021/07/10 17:13:44 dholland Exp $
 
 DISTNAME=      wmweather-2.4.7
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    x11
 MASTER_SITES=  https://people.debian.org/~godisch/wmweather/
 

Index: pkgsrc/x11/wmweather/distinfo
diff -u pkgsrc/x11/wmweather/distinfo:1.13 pkgsrc/x11/wmweather/distinfo:1.14
--- pkgsrc/x11/wmweather/distinfo:1.13  Sun Sep 13 20:12:08 2020
+++ pkgsrc/x11/wmweather/distinfo       Sat Jul 10 17:13:44 2021
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.13 2020/09/13 20:12:08 wiz Exp $
+$NetBSD: distinfo,v 1.14 2021/07/10 17:13:44 dholland Exp $
 
 SHA1 (wmweather-2.4.7.tar.gz) = a227b0efe8e141e6fde0dbe21a6bfb9cad026aab
 RMD160 (wmweather-2.4.7.tar.gz) = 1dae2f985f6b2cbd48da9a0b3adc1ced91b693bb
 SHA512 (wmweather-2.4.7.tar.gz) = d9d0c46e85a24aaa278aa75e0fcd51fc417c3c094d9e69c5820a288955c3ebdde21a24b26964824d9275a41ec053e3d942b185b24088d806e033e311e6e09108
 Size (wmweather-2.4.7.tar.gz) = 86220 bytes
 SHA1 (patch-aa) = a882d59ff36a5fb23822ab9288c48f62edc094d8
-SHA1 (patch-wmweather.c) = ef7e6a9ebc4bd28c3b99bf49715f8e02f670028a
+SHA1 (patch-wmweather.c) = 7c5e0f3e379e82333dbdd7b6799e4398dc06e815

Index: pkgsrc/x11/wmweather/patches/patch-wmweather.c
diff -u pkgsrc/x11/wmweather/patches/patch-wmweather.c:1.1 pkgsrc/x11/wmweather/patches/patch-wmweather.c:1.2
--- pkgsrc/x11/wmweather/patches/patch-wmweather.c:1.1  Thu Jun 23 18:24:07 2016
+++ pkgsrc/x11/wmweather/patches/patch-wmweather.c      Sat Jul 10 17:13:44 2021
@@ -1,10 +1,11 @@
-$NetBSD: patch-wmweather.c,v 1.1 2016/06/23 18:24:07 dholland Exp $
+$NetBSD: patch-wmweather.c,v 1.2 2021/07/10 17:13:44 dholland Exp $
 
 Use ctype.h functions correctly.
+Use the proper type with time().
 
---- wmweather.c~       2009-07-03 16:00:38.000000000 +0000
+--- wmweather.c.orig   2019-02-13 19:54:49.000000000 +0000
 +++ wmweather.c
-@@ -270,7 +270,7 @@ static void do_conf(const char *rcfile)
+@@ -269,7 +269,7 @@ static void do_conf(const char *rcfile)
                                exit(1);
                        }
                        for (i = 0; i < 4; i++)
@@ -13,7 +14,7 @@ Use ctype.h functions correctly.
                        if (station != NULL)
                                free(station);
                        station = strdup(optarg);
-@@ -407,7 +407,7 @@ static void do_opts(int argc, char *argv
+@@ -406,7 +406,7 @@ static void do_opts(int argc, char *argv
                                exit(1);
                        }
                        for (i = 0; i < 4; i++)
@@ -22,3 +23,30 @@ Use ctype.h functions correctly.
                        if (station != NULL)
                                free(station);
                        station = optarg;
+@@ -690,11 +690,12 @@ static void update(int force_read)
+       char   buffer[MAX_STRING], *i;
+       int    line, n, q, sgn;
+       long   l = 0;
++      time_t tl;
+ 
+-      time(&l);
+-      tm = gmtime(&l);
++      time(&tl);
++      tm = gmtime(&tl);
+       utc_diff = tm->tm_hour;
+-      tm = localtime(&l);
++      tm = localtime(&tl);
+       utc_diff = (tm->tm_hour - utc_diff + 24) % 24 * 3600;
+ 
+       if (stat(report, &rst) < 0 && errno != ENOENT) {
+@@ -1129,8 +1130,8 @@ static void update(int force_read)
+ 
+       } else {
+ 
+-              time(&l);
+-              tm = localtime(&l);
++              time(&tl);
++              tm = localtime(&tl);
+               if (gusting) {
+                       showwinddir = tm->tm_sec % 30 < 10;
+                       showgusting = tm->tm_sec % 30 >= 10 && tm->tm_sec % 30 < 20;



Home | Main Index | Thread Index | Old Index