pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/dnsmasq



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Sat Feb 25 03:30:47 UTC 2023

Modified Files:
        pkgsrc/net/dnsmasq: Makefile distinfo
Added Files:
        pkgsrc/net/dnsmasq/patches: patch-src_dhcp-common.c patch-src_dhcp.c
            patch-src_loop.c patch-src_option.c patch-src_rfc2131.c
            patch-src_tftp.c

Log Message:
net/dnsmasq: Patch away ctype(3) abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 pkgsrc/net/dnsmasq/Makefile
cvs rdiff -u -r1.47 -r1.48 pkgsrc/net/dnsmasq/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/dnsmasq/patches/patch-src_dhcp-common.c \
    pkgsrc/net/dnsmasq/patches/patch-src_dhcp.c \
    pkgsrc/net/dnsmasq/patches/patch-src_loop.c \
    pkgsrc/net/dnsmasq/patches/patch-src_option.c \
    pkgsrc/net/dnsmasq/patches/patch-src_tftp.c
cvs rdiff -u -r0 -r1.3 pkgsrc/net/dnsmasq/patches/patch-src_rfc2131.c

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

Modified files:

Index: pkgsrc/net/dnsmasq/Makefile
diff -u pkgsrc/net/dnsmasq/Makefile:1.49 pkgsrc/net/dnsmasq/Makefile:1.50
--- pkgsrc/net/dnsmasq/Makefile:1.49    Tue Feb  7 08:51:45 2023
+++ pkgsrc/net/dnsmasq/Makefile Sat Feb 25 03:30:47 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2023/02/07 08:51:45 adam Exp $
+# $NetBSD: Makefile,v 1.50 2023/02/25 03:30:47 riastradh Exp $
 
 DISTNAME=      dnsmasq-2.89
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  https://thekelleys.org.uk/dnsmasq/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/net/dnsmasq/distinfo
diff -u pkgsrc/net/dnsmasq/distinfo:1.47 pkgsrc/net/dnsmasq/distinfo:1.48
--- pkgsrc/net/dnsmasq/distinfo:1.47    Tue Feb  7 08:51:45 2023
+++ pkgsrc/net/dnsmasq/distinfo Sat Feb 25 03:30:47 2023
@@ -1,7 +1,13 @@
-$NetBSD: distinfo,v 1.47 2023/02/07 08:51:45 adam Exp $
+$NetBSD: distinfo,v 1.48 2023/02/25 03:30:47 riastradh Exp $
 
 BLAKE2s (dnsmasq-2.89.tar.xz) = 1b14c7403ee3e3de7d88acf0f34ff946ca03b870e9b196745285ea53aa72f90b
 SHA512 (dnsmasq-2.89.tar.xz) = 4384ed5b673e10eaf6532e6eaeb5c0a6b817581433cc28c632bdcbadbfc050a0ab73bc5b73c98d708cd39515bb3f72168714b0aa5f16436cebdd18020648d428
 Size (dnsmasq-2.89.tar.xz) = 562700 bytes
 SHA1 (patch-src_bpf.c) = 4115a5391f57564663bbfc448fbb865c370318a6
+SHA1 (patch-src_dhcp-common.c) = e7b8ac99e756bc5964e1070cfe8d07f4e3a5a7b1
+SHA1 (patch-src_dhcp.c) = 10cf20de250479172e97a627ff4c8fbb8e414fe7
 SHA1 (patch-src_dump.c) = e5788d9e3112b1e5b2ef7ce500b0262b95c375c6
+SHA1 (patch-src_loop.c) = 6c8009326658c8e603a5e651a93e0fa7a8650604
+SHA1 (patch-src_option.c) = a2267ddbcfe40ef197ff0138d3177ba184e6a69a
+SHA1 (patch-src_rfc2131.c) = 200ed9e1752d2295de7d27830654e07e669881bd
+SHA1 (patch-src_tftp.c) = a72180e297b9da4858b77b7d8bc7a7e69f7f3468

Added files:

Index: pkgsrc/net/dnsmasq/patches/patch-src_dhcp-common.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_dhcp-common.c:1.1
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_dhcp-common.c  Sat Feb 25 03:30:47 2023
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_dhcp-common.c,v 1.1 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/dhcp-common.c.orig     2023-02-02 20:24:24.000000000 +0000
++++ src/dhcp-common.c
+@@ -838,7 +838,7 @@ char *option_string(int prot, unsigned i
+               for (i = 0, j = 0; i < opt_len && j < buf_len ; i++)
+                 {
+                   char c = val[i];
+-                  if (isprint((int)c))
++                  if (isprint((unsigned char)c))
+                     buf[j++] = c;
+                 }
+ #ifdef HAVE_DHCP6
+@@ -852,7 +852,7 @@ char *option_string(int prot, unsigned i
+                   for (k = i + 1; k < opt_len && k < l && j < buf_len ; k++)
+                    {
+                      char c = val[k];
+-                     if (isprint((int)c))
++                     if (isprint((unsigned char)c))
+                        buf[j++] = c;
+                    }
+                   i = l;
+@@ -873,7 +873,7 @@ char *option_string(int prot, unsigned i
+                   for (k = 0; k < len && j < buf_len; k++)
+                     {
+                      char c = *p++;
+-                     if (isprint((int)c))
++                     if (isprint((unsigned char)c))
+                        buf[j++] = c;
+                    }
+                   i += len +2;
Index: pkgsrc/net/dnsmasq/patches/patch-src_dhcp.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_dhcp.c:1.1
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_dhcp.c Sat Feb 25 03:30:47 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_dhcp.c,v 1.1 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/dhcp.c.orig    2023-02-02 20:24:24.000000000 +0000
++++ src/dhcp.c
+@@ -916,14 +916,14 @@ void dhcp_read_ethers(void)
+       
+       lineno++;
+       
+-      while (strlen(buff) > 0 && isspace((int)buff[strlen(buff)-1]))
++      while (strlen(buff) > 0 && isspace((unsigned char)buff[strlen(buff)-1]))
+       buff[strlen(buff)-1] = 0;
+       
+       if ((*buff == '#') || (*buff == '+') || (*buff == 0))
+       continue;
+       
+-      for (ip = buff; *ip && !isspace((int)*ip); ip++);
+-      for(; *ip && isspace((int)*ip); ip++)
++      for (ip = buff; *ip && !isspace((unsigned char)*ip); ip++);
++      for(; *ip && isspace((unsigned char)*ip); ip++)
+       *ip = 0;
+       if (!*ip || parse_hex(buff, hwaddr, ETHER_ADDR_LEN, NULL, NULL) != ETHER_ADDR_LEN)
+       {
Index: pkgsrc/net/dnsmasq/patches/patch-src_loop.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_loop.c:1.1
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_loop.c Sat Feb 25 03:30:47 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_loop.c,v 1.1 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/loop.c.orig    2023-02-02 20:24:24.000000000 +0000
++++ src/loop.c
+@@ -92,7 +92,7 @@ int detect_loop(char *query, int type)
+     return 0;
+ 
+   for (i = 0; i < 8; i++)
+-    if (!isxdigit(query[i]))
++    if (!isxdigit((unsigned char)query[i]))
+       return 0;
+ 
+   uid = strtol(query, NULL, 16);
Index: pkgsrc/net/dnsmasq/patches/patch-src_option.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_option.c:1.1
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_option.c       Sat Feb 25 03:30:47 2023
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_option.c,v 1.1 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/option.c.orig  2023-02-02 20:24:24.000000000 +0000
++++ src/option.c
+@@ -2751,7 +2751,7 @@ static int one_opt(int option, char *arg
+               ret_err(gen_err);
+             
+             for (p = arg; *p; p++)
+-              if (!isxdigit((int)*p))
++              if (!isxdigit((unsigned char)*p))
+                 ret_err(gen_err);
+             
+             set_option_bool(OPT_UMBRELLA_DEVID);
+@@ -4836,7 +4836,7 @@ err:
+           new->target = target;
+           new->ttl = ttl;
+ 
+-          for (arg += arglen+1; *arg && isspace(*arg); arg++);
++          for (arg += arglen+1; *arg && isspace((unsigned char)*arg); arg++);
+         }
+       
+       break;
+@@ -5227,7 +5227,7 @@ err:
+       unhide_metas(keyhex);
+       /* 4034: "Whitespace is allowed within digits" */
+       for (cp = keyhex; *cp; )
+-        if (isspace(*cp))
++        if (isspace((unsigned char)*cp))
+           for (cp1 = cp; *cp1; cp1++)
+             *cp1 = *(cp1+1);
+         else
+@@ -5315,7 +5315,7 @@ static void read_file(char *file, FILE *
+             memmove(p, p+1, strlen(p+1)+1);
+           }
+ 
+-        if (isspace(*p))
++        if (isspace((unsigned char)*p))
+           {
+             *p = ' ';
+             white = 1;
Index: pkgsrc/net/dnsmasq/patches/patch-src_tftp.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_tftp.c:1.1
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_tftp.c Sat Feb 25 03:30:47 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_tftp.c,v 1.1 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/tftp.c.orig    2023-02-02 20:24:24.000000000 +0000
++++ src/tftp.c
+@@ -405,7 +405,7 @@ void tftp_request(struct listener *liste
+       if (*p == '\\')
+         *p = '/';
+       else if (option_bool(OPT_TFTP_LC))
+-        *p = tolower(*p);
++        *p = tolower((unsigned char)*p);
+               
+       strcpy(daemon->namebuff, "/");
+       if (prefix)

Index: pkgsrc/net/dnsmasq/patches/patch-src_rfc2131.c
diff -u /dev/null pkgsrc/net/dnsmasq/patches/patch-src_rfc2131.c:1.3
--- /dev/null   Sat Feb 25 03:30:47 2023
+++ pkgsrc/net/dnsmasq/patches/patch-src_rfc2131.c      Sat Feb 25 03:30:47 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_rfc2131.c,v 1.3 2023/02/25 03:30:47 riastradh Exp $
+
+Fix ctype(3) misuse.
+
+--- src/rfc2131.c.orig 2023-02-02 20:24:24.000000000 +0000
++++ src/rfc2131.c
+@@ -1678,7 +1678,7 @@ static int sanitise(unsigned char *opt, 
+   for (i = option_len(opt); i > 0; i--)
+     {
+       char c = *p++;
+-      if (isprint((int)c))
++      if (isprint((unsigned char)c))
+       *buf++ = c;
+     }
+   *buf = 0; /* add terminator */



Home | Main Index | Thread Index | Old Index