summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-06-11 15:24:52 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-06-11 15:26:05 +0200
commit19a3c009970d2a917d4dbf7489508e1ebe41aec0 (patch)
treecce2a7b43108dfe8a03328ff5b1042520d97300a /net-print
parentdev-lang/crystal: bump up to 0.25.0 (diff)
downloadgentoo-19a3c009970d2a917d4dbf7489508e1ebe41aec0.tar.gz
gentoo-19a3c009970d2a917d4dbf7489508e1ebe41aec0.tar.bz2
gentoo-19a3c009970d2a917d4dbf7489508e1ebe41aec0.zip
net-print/cups: Revbumps to fix high system load. Removed old.
Bug: https://bugs.gentoo.org/657526 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'net-print')
-rw-r--r--net-print/cups/cups-2.2.8-r1.ebuild (renamed from net-print/cups/cups-2.2.8.ebuild)1
-rw-r--r--net-print/cups/cups-2.3_beta5-r1.ebuild (renamed from net-print/cups/cups-2.3_beta5.ebuild)1
-rw-r--r--net-print/cups/files/cups-2.2.8-validation_fixes.patch60
3 files changed, 62 insertions, 0 deletions
diff --git a/net-print/cups/cups-2.2.8.ebuild b/net-print/cups/cups-2.2.8-r1.ebuild
index 55a2084618d0..d9adea70fc40 100644
--- a/net-print/cups/cups-2.2.8.ebuild
+++ b/net-print/cups/cups-2.2.8-r1.ebuild
@@ -79,6 +79,7 @@ PATCHES=(
"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
+ "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
)
MULTILIB_CHOST_TOOLS=(
diff --git a/net-print/cups/cups-2.3_beta5.ebuild b/net-print/cups/cups-2.3_beta5-r1.ebuild
index 608055933fa8..ee8375c1474a 100644
--- a/net-print/cups/cups-2.3_beta5.ebuild
+++ b/net-print/cups/cups-2.3_beta5-r1.ebuild
@@ -77,6 +77,7 @@ PATCHES=(
"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
+ "${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
)
MULTILIB_CHOST_TOOLS=(
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
new file mode 100644
index 000000000000..ef87b6a81d86
--- /dev/null
+++ b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
@@ -0,0 +1,60 @@
+From 455c52a027ab3548953372a0b7bdb0008420e9ba Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Fri, 8 Jun 2018 22:29:50 +0200
+Subject: [PATCH] Fix validation rejecting all NAME and TEXT attrs
+
+When the UTF-8 validation loop finishes successfully, `*ptr` points at
+the `'\0'` at the end of the string. The code misinterpreted this as a
+control character (`*ptr < ' '`) and failed the validation.
+
+Fixes https://github.com/apple/cups/issues/5325
+---
+ cups/ipp.c | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/cups/ipp.c b/cups/ipp.c
+index 95d53cc44..204c71fcd 100644
+--- a/cups/ipp.c
++++ b/cups/ipp.c
+@@ -5030,15 +5030,13 @@ ippValidateAttribute(
+ else if (*ptr & 0x80)
+ break;
+ else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f)
+- break;
++ {
++ 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);
++ return (0);
++ }
+ }
+
+- if (*ptr < ' ' || *ptr == 0x7f)
+- {
+- 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);
+- return (0);
+- }
+- else if (*ptr)
++ if (*ptr)
+ {
+ 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);
+ return (0);
+@@ -5088,15 +5086,13 @@ ippValidateAttribute(
+ else if (*ptr & 0x80)
+ break;
+ else if (*ptr < ' ' || *ptr == 0x7f)
+- break;
++ {
++ 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);
++ return (0);
++ }
+ }
+
+- if (*ptr < ' ' || *ptr == 0x7f)
+- {
+- 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);
+- return (0);
+- }
+- else if (*ptr)
++ if (*ptr)
+ {
+ 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);
+ return (0);