diff options
author | riastradh <riastradh@pkgsrc.org> | 2022-04-05 10:06:41 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2022-04-05 10:06:41 +0000 |
commit | f968f4169f6dc0d92ec558ddfc08dcc5c2b9ccb1 (patch) | |
tree | a456509671abc45f9f03451b3e08539cc30fbf26 | |
parent | d10776bc061c079b74c70cd8e3719f8f4e23bc3c (diff) | |
download | pkgsrc-f968f4169f6dc0d92ec558ddfc08dcc5c2b9ccb1.tar.gz |
graphics/cairo: Fix ctype(3) abuse.
-rw-r--r-- | graphics/cairo/Makefile | 4 | ||||
-rw-r--r-- | graphics/cairo/distinfo | 8 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c | 15 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-perf_cairo-analyse-trace.c | 20 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-perf_cairo-perf-report.c | 15 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-perf_cairo-perf-trace.c | 20 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-src_cairo-type1-subset.c | 15 | ||||
-rw-r--r-- | graphics/cairo/patches/patch-util_cairo-trace_trace.c | 51 |
8 files changed, 145 insertions, 3 deletions
diff --git a/graphics/cairo/Makefile b/graphics/cairo/Makefile index e682f4803ab..4b2eaf82de7 100644 --- a/graphics/cairo/Makefile +++ b/graphics/cairo/Makefile @@ -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 --git a/graphics/cairo/distinfo b/graphics/cairo/distinfo index 93ba9124255..a5b8f4ce9d2 100644 --- a/graphics/cairo/distinfo +++ b/graphics/cairo/distinfo @@ -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-aa) = b01bc60f77a7122b0c0d0d9b25ad512bac7c190c 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 --git a/graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c b/graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c new file mode 100644 index 00000000000..7477de0564b --- /dev/null +++ b/graphics/cairo/patches/patch-boilerplate_cairo-boilerplate.c @@ -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 --git a/graphics/cairo/patches/patch-perf_cairo-analyse-trace.c b/graphics/cairo/patches/patch-perf_cairo-analyse-trace.c new file mode 100644 index 00000000000..1c1744e571a --- /dev/null +++ b/graphics/cairo/patches/patch-perf_cairo-analyse-trace.c @@ -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 --git a/graphics/cairo/patches/patch-perf_cairo-perf-report.c b/graphics/cairo/patches/patch-perf_cairo-perf-report.c new file mode 100644 index 00000000000..cf6285b93ed --- /dev/null +++ b/graphics/cairo/patches/patch-perf_cairo-perf-report.c @@ -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 --git a/graphics/cairo/patches/patch-perf_cairo-perf-trace.c b/graphics/cairo/patches/patch-perf_cairo-perf-trace.c new file mode 100644 index 00000000000..f55c2deb2e2 --- /dev/null +++ b/graphics/cairo/patches/patch-perf_cairo-perf-trace.c @@ -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 --git a/graphics/cairo/patches/patch-src_cairo-type1-subset.c b/graphics/cairo/patches/patch-src_cairo-type1-subset.c new file mode 100644 index 00000000000..06c8de7f87b --- /dev/null +++ b/graphics/cairo/patches/patch-src_cairo-type1-subset.c @@ -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 --git a/graphics/cairo/patches/patch-util_cairo-trace_trace.c b/graphics/cairo/patches/patch-util_cairo-trace_trace.c new file mode 100644 index 00000000000..c7095817f16 --- /dev/null +++ b/graphics/cairo/patches/patch-util_cairo-trace_trace.c @@ -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] = { '\\' }; |