From 54271692865756cd54f28d5324d1712feb158f22f416db0b36ccf558644f4cf9 Mon Sep 17 00:00:00 2001 From: Johannes Meixner Date: Thu, 21 Feb 2019 12:56:32 +0000 Subject: [PATCH] Accepting request 677995 from home:vliaskovitis:branches:Printing Add issue5509-fix-utf-8-validation-issue.patch (bsc#1118118) OBS-URL: https://build.opensuse.org/request/show/677995 OBS-URL: https://build.opensuse.org/package/show/Printing/cups?expand=0&rev=357 --- baselibs.conf | 3 - cups.changes | 8 +++ cups.spec | 11 +-- issue5509-fix-utf-8-validation-issue.patch | 84 ++++++++++++++++++++++ 4 files changed, 99 insertions(+), 7 deletions(-) create mode 100644 issue5509-fix-utf-8-validation-issue.patch diff --git a/baselibs.conf b/baselibs.conf index 3fed371..929a54f 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1,8 +1,5 @@ libcups2 provides "cups-libs- = " obsoletes "cups-libs- < " -libcupscgi1 libcupsimage2 -libcupsmime1 -libcupsppdc1 cups-devel diff --git a/cups.changes b/cups.changes index 011b4f1..f3a53ee 100644 --- a/cups.changes +++ b/cups.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Feb 21 12:44:01 CET 2019 - vliaskovitis@suse.com + +- Add issue5509-fix-utf-8-validation-issue.patch (bsc#1118118) + Fixes https://github.com/apple/cups/issues/5509 +- Remove libcupscgi1, libcupsmime1, libcupsppdc1 from + baselibs.conf + ------------------------------------------------------------------- Mon Dec 10 14:09:12 CET 2018 - jsmeix@suse.de diff --git a/cups.spec b/cups.spec index ee137a9..0ded623 100644 --- a/cups.spec +++ b/cups.spec @@ -1,7 +1,7 @@ # # spec file for package cups # -# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -60,6 +60,8 @@ Patch11: cups-2.1.0-default-webcontent-path.patch Patch12: cups-2.1.0-cups-systemd-socket.patch # Patch42 Let cupsd start after possible network connection (boo#1111351) Patch42: let-cupsd-start-after-network.patch +# Patch43 Fix UTF-8 validation issue (bsc#1118118, Issue #5509) +Patch43: issue5509-fix-utf-8-validation-issue.patch # Patch100...Patch999 is for private patches from SUSE which are not intended for upstream: # Patch100 cups-pam.diff adds conf/pam.suse regarding support for PAM for SUSE: Patch100: cups-pam.diff @@ -201,7 +203,6 @@ operation. %package client Summary: CUPS Client Programs -Group: Hardware/Printing # Require the exact matching version-release of the libcups* sub-packages because # non-matching CUPS libraries may let CUPS software crash (e.g. segfault) # because all CUPS software is provided as one single CUPS source tarball @@ -211,6 +212,7 @@ Group: Hardware/Printing # on the same package repository where the cups package is because # all are built simultaneously from the same cups source package # and all required packages are provided on the same repository: +Group: Hardware/Printing Requires: libcups2 = %{version}-%{release} Requires: libcupsimage2 = %{version}-%{release} # Conflicts with other print spoolers which provide same binaries like /usr/bin/lp and so on: @@ -229,13 +231,13 @@ System V and Berkeley print systems. %package devel Summary: Development Environment for CUPS -Group: Development/Libraries/C and C++ # Do not require the exact matching version-release # of the native CUPS libraries (i.e. the libcups* sub-packages) # but only CUPS libraries with matching version because # for building third-party software which uses only the CUPS public API # there are no CUPS-internal dependencies via CUPS private API calls # (the latter would require the exact matching CUPS libraries version-release): +Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libcups2 = %{version} Requires: libcupsimage2 = %{version} @@ -279,6 +281,7 @@ printer drivers for CUPS. #patch12 -b cups-systemd-socket.orig # Patch42 Let cupsd start after possible network connection (boo#1111351) %patch42 -p0 +%patch43 -p1 # Patch100...Patch999 is for private patches from SUSE which are not intended for upstream: # Patch100 cups-pam.diff adds conf/pam.suse regarding support for PAM for SUSE: %patch100 -b cups-pam.orig diff --git a/issue5509-fix-utf-8-validation-issue.patch b/issue5509-fix-utf-8-validation-issue.patch new file mode 100644 index 0000000..0af5fd2 --- /dev/null +++ b/issue5509-fix-utf-8-validation-issue.patch @@ -0,0 +1,84 @@ +Index: cups-2.3b6/cups/ipp.c +=================================================================== +--- cups-2.3b6.orig/cups/ipp.c ++++ cups-2.3b6/cups/ipp.c +@@ -4909,30 +4909,24 @@ ippValidateAttribute( + { + if ((*ptr & 0xe0) == 0xc0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80) + break; ++ ++ ptr ++; + } + else if ((*ptr & 0xf0) == 0xe0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80) + break; ++ ++ ptr += 2; + } + else if ((*ptr & 0xf8) == 0xf0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80) + break; ++ ++ ptr += 3; + } + else if (*ptr & 0x80) + break; +@@ -4970,30 +4964,24 @@ ippValidateAttribute( + { + if ((*ptr & 0xe0) == 0xc0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80) + break; ++ ++ ptr ++; + } + else if ((*ptr & 0xf0) == 0xe0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80) + break; ++ ++ ptr += 2; + } + else if ((*ptr & 0xf8) == 0xf0) + { +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) +- break; +- ptr ++; +- if ((*ptr & 0xc0) != 0x80) ++ if ((ptr[1] & 0xc0) != 0x80 || (ptr[2] & 0xc0) != 0x80 || (ptr[3] & 0xc0) != 0x80) + break; ++ ++ ptr += 3; + } + else if (*ptr & 0x80) + break;