Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/, net-print/cups/files/
Date: Mon, 11 Jun 2018 13:26:21
Message-Id: 1528723565.19a3c009970d2a917d4dbf7489508e1ebe41aec0.polynomial-c@gentoo
1 commit: 19a3c009970d2a917d4dbf7489508e1ebe41aec0
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 11 13:24:52 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 11 13:26:05 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19a3c009
7
8 net-print/cups: Revbumps to fix high system load. Removed old.
9
10 Bug: https://bugs.gentoo.org/657526
11 Package-Manager: Portage-2.3.40, Repoman-2.3.9
12
13 .../{cups-2.2.8.ebuild => cups-2.2.8-r1.ebuild} | 1 +
14 ...s-2.3_beta5.ebuild => cups-2.3_beta5-r1.ebuild} | 1 +
15 .../cups/files/cups-2.2.8-validation_fixes.patch | 60 ++++++++++++++++++++++
16 3 files changed, 62 insertions(+)
17
18 diff --git a/net-print/cups/cups-2.2.8.ebuild b/net-print/cups/cups-2.2.8-r1.ebuild
19 similarity index 99%
20 rename from net-print/cups/cups-2.2.8.ebuild
21 rename to net-print/cups/cups-2.2.8-r1.ebuild
22 index 55a2084618d..d9adea70fc4 100644
23 --- a/net-print/cups/cups-2.2.8.ebuild
24 +++ b/net-print/cups/cups-2.2.8-r1.ebuild
25 @@ -79,6 +79,7 @@ PATCHES=(
26 "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
27 "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
28 "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
29 + "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
30 )
31
32 MULTILIB_CHOST_TOOLS=(
33
34 diff --git a/net-print/cups/cups-2.3_beta5.ebuild b/net-print/cups/cups-2.3_beta5-r1.ebuild
35 similarity index 99%
36 rename from net-print/cups/cups-2.3_beta5.ebuild
37 rename to net-print/cups/cups-2.3_beta5-r1.ebuild
38 index 608055933fa..ee8375c1474 100644
39 --- a/net-print/cups/cups-2.3_beta5.ebuild
40 +++ b/net-print/cups/cups-2.3_beta5-r1.ebuild
41 @@ -77,6 +77,7 @@ PATCHES=(
42 "${FILESDIR}/${PN}-1.4.4-nostrip.patch"
43 "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
44 "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
45 + "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
46 )
47
48 MULTILIB_CHOST_TOOLS=(
49
50 diff --git a/net-print/cups/files/cups-2.2.8-validation_fixes.patch b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
51 new file mode 100644
52 index 00000000000..ef87b6a81d8
53 --- /dev/null
54 +++ b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
55 @@ -0,0 +1,60 @@
56 +From 455c52a027ab3548953372a0b7bdb0008420e9ba Mon Sep 17 00:00:00 2001
57 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@×××××.com>
58 +Date: Fri, 8 Jun 2018 22:29:50 +0200
59 +Subject: [PATCH] Fix validation rejecting all NAME and TEXT attrs
60 +
61 +When the UTF-8 validation loop finishes successfully, `*ptr` points at
62 +the `'\0'` at the end of the string. The code misinterpreted this as a
63 +control character (`*ptr < ' '`) and failed the validation.
64 +
65 +Fixes https://github.com/apple/cups/issues/5325
66 +---
67 + cups/ipp.c | 24 ++++++++++--------------
68 + 1 file changed, 10 insertions(+), 14 deletions(-)
69 +
70 +diff --git a/cups/ipp.c b/cups/ipp.c
71 +index 95d53cc44..204c71fcd 100644
72 +--- a/cups/ipp.c
73 ++++ b/cups/ipp.c
74 +@@ -5030,15 +5030,13 @@ ippValidateAttribute(
75 + else if (*ptr & 0x80)
76 + break;
77 + else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f)
78 +- break;
79 ++ {
80 ++ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
81 ++ return (0);
82 ++ }
83 + }
84 +
85 +- if (*ptr < ' ' || *ptr == 0x7f)
86 +- {
87 +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
88 +- return (0);
89 +- }
90 +- else if (*ptr)
91 ++ if (*ptr)
92 + {
93 + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
94 + return (0);
95 +@@ -5088,15 +5086,13 @@ ippValidateAttribute(
96 + else if (*ptr & 0x80)
97 + break;
98 + else if (*ptr < ' ' || *ptr == 0x7f)
99 +- break;
100 ++ {
101 ++ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
102 ++ return (0);
103 ++ }
104 + }
105 +
106 +- if (*ptr < ' ' || *ptr == 0x7f)
107 +- {
108 +- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
109 +- return (0);
110 +- }
111 +- else if (*ptr)
112 ++ if (*ptr)
113 + {
114 + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
115 + return (0);