pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/cairo graphics/cairo: Fix ctype(3) abuse.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/73aa0d81af00
branches:  trunk
changeset: 376319:73aa0d81af00
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Tue Apr 05 10:06:41 2022 +0000

description:
graphics/cairo: Fix ctype(3) abuse.

diffstat:

 graphics/cairo/Makefile                                      |   4 +-
 graphics/cairo/distinfo                                      |   8 +-
 graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c |  15 +++
 graphics/cairo/patches/patch-perf_cairo-analyse-trace.c      |  20 ++++
 graphics/cairo/patches/patch-perf_cairo-perf-report.c        |  15 +++
 graphics/cairo/patches/patch-perf_cairo-perf-trace.c         |  20 ++++
 graphics/cairo/patches/patch-src_cairo-type1-subset.c        |  15 +++
 graphics/cairo/patches/patch-util_cairo-trace_trace.c        |  51 ++++++++++++
 8 files changed, 145 insertions(+), 3 deletions(-)

diffs (195 lines):

diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/Makefile
--- a/graphics/cairo/Makefile   Tue Apr 05 10:05:43 2022 +0000
+++ b/graphics/cairo/Makefile   Tue Apr 05 10:06:41 2022 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.149 2021/05/25 07:29:41 nia Exp $
+# $NetBSD: Makefile,v 1.150 2022/04/05 10:06:41 riastradh Exp $
 
 .include "../../graphics/cairo/Makefile.common"
 
-PKGREVISION=   4
+PKGREVISION=   5
 
 TEST_TARGET=                   check
 
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/distinfo
--- a/graphics/cairo/distinfo   Tue Apr 05 10:05:43 2022 +0000
+++ b/graphics/cairo/distinfo   Tue Apr 05 10:06:41 2022 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.92 2021/10/26 10:46:00 nia Exp $
+$NetBSD: distinfo,v 1.93 2022/04/05 10:06:41 riastradh Exp $
 
 BLAKE2s (cairo-1.16.0.tar.xz) = fba95926f57ad97d9c0c197c355ef646fd3cf9d17d1eb3270d343eef5d7bfa40
 SHA512 (cairo-1.16.0.tar.xz) = 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f
@@ -7,5 +7,11 @@
 SHA1 (patch-ab) = 11f7e0e59bd5c51a8fdacb48dcf2f2fefdf3b768
 SHA1 (patch-ac) = 1785bbef6bcab4781bf89e1b986a7eb96e5f2b64
 SHA1 (patch-ad) = a1068a37113b162ccfe14d7f1bd0baa9df7e5530
+SHA1 (patch-boilerplate_cairo-boilerplate.c) = 54dcd912c5059e107706b1445db2aea7ea50ad2d
+SHA1 (patch-perf_cairo-analyse-trace.c) = 6c0d95d2f6e56e9957023df50e89bcf6dbc94ada
+SHA1 (patch-perf_cairo-perf-report.c) = 25da676dbcd24572c7ea35e620398b9c6fe53793
+SHA1 (patch-perf_cairo-perf-trace.c) = ba9635e7913b07db707bfaf6927a05541641d243
 SHA1 (patch-src_cairo-ft-font.c) = 97288d79380473869f1049c1d8955a2f6fa3d178
 SHA1 (patch-src_cairo-image-compositor.c) = 83337d8211083d77b061c43b69da2b61080776d9
+SHA1 (patch-src_cairo-type1-subset.c) = ab0470d92c7ef0207cfb32af3ca3862ee86d0897
+SHA1 (patch-util_cairo-trace_trace.c) = 645e4fffdbd86887f0f22ea2a654d14a53f84e1a
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c      Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-boilerplate_cairo-boilerplate.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- boilerplate/cairo-boilerplate.c.orig       2018-08-17 01:10:53.000000000 +0000
++++ boilerplate/cairo-boilerplate.c
+@@ -566,7 +566,7 @@ _cairo_boilerplate_target_matches_name (
+     if (! (name_len == 1 && 0 == strncmp (tname, "?", 1))) { /* wildcard? */
+       if (0 != strncmp (target->name, tname, name_len)) /* exact match? */
+           return FALSE;
+-      if (isalnum (target->name[name_len]))
++      if (isalnum ((unsigned char)target->name[name_len]))
+           return FALSE;
+     }
+ 
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-perf_cairo-analyse-trace.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-perf_cairo-analyse-trace.c   Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-perf_cairo-analyse-trace.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- perf/cairo-analyse-trace.c.orig    2018-08-17 01:10:53.000000000 +0000
++++ perf/cairo-analyse-trace.c
+@@ -292,11 +292,11 @@ read_excludes (cairo_perf_t *perf,
+ 
+       /* whitespace delimits */
+       s = line;
+-      while (*s != '\0' && isspace (*s))
++      while (*s != '\0' && isspace ((unsigned char)*s))
+           s++;
+ 
+       t = s;
+-      while (*t != '\0' && ! isspace (*t))
++      while (*t != '\0' && ! isspace ((unsigned char)*t))
+           t++;
+ 
+       if (s != t) {
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-perf_cairo-perf-report.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-perf_cairo-perf-report.c     Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-perf_cairo-perf-report.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- perf/cairo-perf-report.c.orig      2018-08-17 01:10:53.000000000 +0000
++++ perf/cairo-perf-report.c
+@@ -100,7 +100,7 @@ do {                                                                       \
+ #define parse_string(result)                                          \
+ do {                                                                  \
+     for (end = s; *end; end++)                                                \
+-      if (isspace (*end))                                             \
++      if (isspace ((unsigned char)*end))                              \
+           break;                                                      \
+     (result) = strndup (s, end - s);                                  \
+     if ((result) == NULL) {                                           \
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-perf_cairo-perf-trace.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-perf_cairo-perf-trace.c      Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-perf_cairo-perf-trace.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- perf/cairo-perf-trace.c.orig       2018-08-17 01:10:53.000000000 +0000
++++ perf/cairo-perf-trace.c
+@@ -409,11 +409,11 @@ read_excludes (cairo_perf_t *perf,
+ 
+       /* whitespace delimits */
+       s = line;
+-      while (*s != '\0' && isspace (*s))
++      while (*s != '\0' && isspace ((unsigned char)*s))
+           s++;
+ 
+       t = s;
+-      while (*t != '\0' && ! isspace (*t))
++      while (*t != '\0' && ! isspace ((unsigned char)*t))
+           t++;
+ 
+       if (s != t) {
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-src_cairo-type1-subset.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-src_cairo-type1-subset.c     Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_cairo-type1-subset.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- src/cairo-type1-subset.c.orig      2018-08-17 01:10:53.000000000 +0000
++++ src/cairo-type1-subset.c
+@@ -248,7 +248,7 @@ cairo_type1_font_subset_find_segments (c
+       font->eexec_segment = (char *) p + font->header_segment_size;
+       font->eexec_segment_is_ascii = TRUE;
+       for (i = 0; i < 4; i++) {
+-          if (!isxdigit(font->eexec_segment[i]))
++          if (!isxdigit((unsigned char)font->eexec_segment[i]))
+               font->eexec_segment_is_ascii = FALSE;
+       }
+     }
diff -r b13e0803c288 -r 73aa0d81af00 graphics/cairo/patches/patch-util_cairo-trace_trace.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/cairo/patches/patch-util_cairo-trace_trace.c     Tue Apr 05 10:06:41 2022 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-util_cairo-trace_trace.c,v 1.1 2022/04/05 10:06:41 riastradh Exp $
+
+Fix ctype(3) abuse.
+
+--- util/cairo-trace/trace.c.orig      2018-10-16 17:03:13.000000000 +0000
++++ util/cairo-trace/trace.c
+@@ -564,7 +564,7 @@ _trace_dtostr (char *buffer, size_t size
+       if (*p == '+' || *p == '-')
+           p++;
+ 
+-      while (isdigit (*p))
++      while (isdigit ((unsigned char)*p))
+           p++;
+ 
+       if (strncmp (p, decimal_point, decimal_point_len) == 0)
+@@ -584,7 +584,7 @@ _trace_dtostr (char *buffer, size_t size
+     if (*p == '+' || *p == '-')
+       p++;
+ 
+-    while (isdigit (*p))
++    while (isdigit ((unsigned char)*p))
+       p++;
+ 
+     if (strncmp (p, decimal_point, decimal_point_len) == 0) {
+@@ -650,7 +650,7 @@ _trace_vprintf (const char *fmt, va_list
+           f++;
+         }
+ 
+-      while (isdigit (*f))
++      while (isdigit ((unsigned char)*f))
+           f++;
+ 
+       length_modifier = 0;
+@@ -1848,7 +1848,7 @@ _encode_string_literal (char *out, int m
+           max -= 2;
+           break;
+       default:
+-          if (isprint (c) || isspace (c)) {
++          if (isprint ((unsigned char)c) || isspace ((unsigned char)c)) {
+               *out++ = c;
+           } else {
+               int octal = 0;
+@@ -1918,7 +1918,7 @@ ESCAPED_CHAR:
+           _trace_printf ("\\%c", c);
+           break;
+       default:
+-          if (isprint (c) || isspace (c)) {
++          if (isprint ((unsigned char)c) || isspace ((unsigned char)c)) {
+               _trace_printf ("%c", c);
+           } else {
+               char buf[4] = { '\\' };



Home | Main Index | Thread Index | Old Index