pkgsrc-Changes archive

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

CVS commit: pkgsrc/databases/libzdb



Module Name:    pkgsrc
Committed By:   he
Date:           Fri Oct 28 18:25:01 UTC 2022

Modified Files:
        pkgsrc/databases/libzdb: Makefile distinfo
Added Files:
        pkgsrc/databases/libzdb/patches: patch-src_system_Time.c
            patch-src_util_Str.c

Log Message:
databases/libzdb: fix 4 uses of isxxx() by casting arg to u_char.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 pkgsrc/databases/libzdb/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/databases/libzdb/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/databases/libzdb/patches/patch-src_system_Time.c \
    pkgsrc/databases/libzdb/patches/patch-src_util_Str.c

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

Modified files:

Index: pkgsrc/databases/libzdb/Makefile
diff -u pkgsrc/databases/libzdb/Makefile:1.28 pkgsrc/databases/libzdb/Makefile:1.29
--- pkgsrc/databases/libzdb/Makefile:1.28       Fri Oct 28 17:58:03 2022
+++ pkgsrc/databases/libzdb/Makefile    Fri Oct 28 18:25:00 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2022/10/28 17:58:03 he Exp $
+# $NetBSD: Makefile,v 1.29 2022/10/28 18:25:00 he Exp $
 
 DISTNAME=      libzdb-3.2.2
-PKGREVISION=   7
+PKGREVISION=   8
 CATEGORIES=    databases
 MASTER_SITES=  http://www.tildeslash.com/libzdb/dist/
 

Index: pkgsrc/databases/libzdb/distinfo
diff -u pkgsrc/databases/libzdb/distinfo:1.9 pkgsrc/databases/libzdb/distinfo:1.10
--- pkgsrc/databases/libzdb/distinfo:1.9        Fri Oct 28 18:06:09 2022
+++ pkgsrc/databases/libzdb/distinfo    Fri Oct 28 18:25:00 2022
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.9 2022/10/28 18:06:09 he Exp $
+$NetBSD: distinfo,v 1.10 2022/10/28 18:25:00 he Exp $
 
 BLAKE2s (libzdb-3.2.2.tar.gz) = 9df58f68d011a948e1de1a90c74665a89cd61d63ebe1b223adfc588e859d6401
 SHA512 (libzdb-3.2.2.tar.gz) = 1e732f8785322e0369de16a8100c9467e96ad1ca4eee31e8bfc349f4f17d4cc237a691addc060a66e1b46bcfeb99c3aed07b1d5dbe20e70fde4ffbf35dbea2eb
 Size (libzdb-3.2.2.tar.gz) = 752292 bytes
+SHA1 (patch-src_system_Time.c) = 24f69ea591ce6865113c1d1a1cb85cf997f7aab0
+SHA1 (patch-src_util_Str.c) = 81ff5e539772470a9e03029ef4e0cf48e9751b6e
 SHA1 (patch-src_zdbpp.h) = c1dcdc7cea4ed55408107cb3e794ba38430ee4ae
 SHA1 (patch-test_pool.c) = c96b47dc723b7fb7bf5e02cd3cdec49cb66d3656
 SHA1 (patch-test_unit.c) = c7095217e6bf2fa04bb033ae8600fb04d85b4b69

Added files:

Index: pkgsrc/databases/libzdb/patches/patch-src_system_Time.c
diff -u /dev/null pkgsrc/databases/libzdb/patches/patch-src_system_Time.c:1.1
--- /dev/null   Fri Oct 28 18:25:01 2022
+++ pkgsrc/databases/libzdb/patches/patch-src_system_Time.c     Fri Oct 28 18:25:01 2022
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_system_Time.c,v 1.1 2022/10/28 18:25:01 he Exp $
+
+Fix one more pair of isxxxx() uses by casting arg to u_char.
+
+--- src/system/Time.c.orig     2020-03-31 22:57:32.000000000 +0000
++++ src/system/Time.c
+@@ -290,9 +290,9 @@ yy10:
+       { // Timezone: +-HH:MM, +-HH or +-HHMM is offset from UTC in seconds
+                         if (have_time) { // Only set timezone if we have parsed time
+                                 tm.TM_GMTOFF = _a2i(token + 1, 2) * 3600;
+-                                if (isdigit(token[3]))
++                                if (isdigit((u_char)token[3]))
+                                         tm.TM_GMTOFF += _a2i(token + 3, 2) * 60;
+-                                else if (isdigit(token[4]))
++                                else if (isdigit((u_char)token[4]))
+                                         tm.TM_GMTOFF += _a2i(token + 4, 2) * 60;
+                                 if (token[0] == '-')
+                                         tm.TM_GMTOFF *= -1;
Index: pkgsrc/databases/libzdb/patches/patch-src_util_Str.c
diff -u /dev/null pkgsrc/databases/libzdb/patches/patch-src_util_Str.c:1.1
--- /dev/null   Fri Oct 28 18:25:01 2022
+++ pkgsrc/databases/libzdb/patches/patch-src_util_Str.c        Fri Oct 28 18:25:01 2022
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_util_Str.c,v 1.1 2022/10/28 18:25:01 he Exp $
+
+Cast arg to toupper() to u_char, to avoid domain error.
+
+--- src/util/Str.c.orig        2019-05-30 22:22:30.000000000 +0000
++++ src/util/Str.c
+@@ -50,7 +50,8 @@
+ bool Str_isEqual(const char *a, const char *b) {
+       if (a && b) { 
+                 while (*a && *b)
+-                        if (toupper(*a++) != toupper(*b++)) return false;
++                        if (toupper((u_char)*a++) != toupper((u_char)*b++))
++                              return false;
+                 return (*a == *b);
+         }
+         return false;



Home | Main Index | Thread Index | Old Index