public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Zdenek Dohnal <zdohnal@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/libcupsfilters] rawhide: libcupsfilters-2.2.0 is available (fedora#2511889)
Date: Mon, 10 Aug 2026 11:04:03 GMT [thread overview]
Message-ID: <178635984332.1.9153166541565217047.rpms-libcupsfilters-0594b595e2fb@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/libcupsfilters
Branch : rawhide
Commit : 0594b595e2fb6b46be3ba969e4e9b9dd4b81b7e5
Author : Zdenek Dohnal <zdohnal@redhat.com>
Date : 2026-08-10T13:03:58+02:00
Stats : +333/-463 in 11 file(s)
URL : https://src.fedoraproject.org/rpms/libcupsfilters/c/0594b595e2fb6b46be3ba969e4e9b9dd4b81b7e5?branch=rawhide
Log:
libcupsfilters-2.2.0 is available (fedora#2511889)
---
diff --git a/0001-Fix-2.2.0-test-packaging-and-CUPS-datadir-detection-.patch b/0001-Fix-2.2.0-test-packaging-and-CUPS-datadir-detection-.patch
new file mode 100644
index 0000000..4622ea9
--- /dev/null
+++ b/0001-Fix-2.2.0-test-packaging-and-CUPS-datadir-detection-.patch
@@ -0,0 +1,104 @@
+diff --git a/Makefile.am b/Makefile.am
+index 94b3692..fc96476 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -92,8 +92,7 @@ lib_LTLIBRARIES = libcupsfilters.la
+
+ check_SCRIPTS = \
+ cupsfilters/testfilters.sh \
+- cupsfilters/test-pclm-overflow.sh \
+- cupsfilters/test-pdftoraster-copy-height.sh
++ cupsfilters/test-pclm-overflow.sh
+
+ check_PROGRAMS = \
+ testcmyk \
+@@ -116,8 +115,7 @@ TESTS = \
+ test-pdf \
+ test-ps \
+ cupsfilters/testfilters.sh \
+- cupsfilters/test-pclm-overflow.sh \
+- cupsfilters/test-pdftoraster-copy-height.sh
++ cupsfilters/test-pclm-overflow.sh
+
+ # testcmyk # fails as it opens some image.ppm which is nowerhe to be found.
+ # testimage # requires also some ppm file as argument
+diff --git a/configure.ac b/configure.ac
+index 7ef2a37..b4103f0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -79,7 +79,14 @@ AS_IF([$PKGCONFIG --exists cups3], [
+ AC_SUBST(CUPS_CFLAGS)
+ AC_SUBST(CUPS_LIBS)
+
+- CUPS_DATADIR="$($PKGCONFIG --variable=prefix cups3)/share/cups"
++ # Prefer the datadir cups3.pc exports directly. Reconstructing it from
++ # --variable=prefix is wrong when CUPS was built with an architecture-
++ # specific prefix (e.g. /usr/x86_64-pc-linux-gnu): the data lives in the
++ # arch-independent /usr/share/cups, which the .pc records in cups_datadir.
++ # Fall back to the prefix-relative path for a .pc without it. (#201)
++ CUPS_DATADIR="$($PKGCONFIG --variable=cups_datadir cups3)"
++ AS_IF([test "x$CUPS_DATADIR" = x],
++ [CUPS_DATADIR="$($PKGCONFIG --variable=prefix cups3)/share/cups"])
+ AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR", [CUPS datadir])
+ AC_SUBST(CUPS_DATADIR)
+
+@@ -128,7 +135,14 @@ AS_IF([$PKGCONFIG --exists cups3], [
+ cups_prefix="$($PKGCONFIG --variable=prefix cups)"
+ AS_IF([test "x$cups_prefix" = x], [cups_prefix=/usr])
+
+- CUPS_DATADIR="$cups_prefix/share/cups"
++ # Prefer the datadir cups.pc exports directly. Reconstructing it from
++ # --variable=prefix is wrong when CUPS was built with an architecture-
++ # specific prefix (e.g. /usr/x86_64-pc-linux-gnu): the data lives in the
++ # arch-independent /usr/share/cups, which the .pc records in cups_datadir.
++ # Fall back to the prefix-relative path for a .pc without it. (#201)
++ CUPS_DATADIR="$($PKGCONFIG --variable=cups_datadir cups)"
++ AS_IF([test "x$CUPS_DATADIR" = x],
++ [CUPS_DATADIR="$cups_prefix/share/cups"])
+ AC_DEFINE_UNQUOTED(CUPS_DATADIR, "$CUPS_DATADIR", [CUPS datadir])
+ AC_SUBST(CUPS_DATADIR)
+
+diff --git a/cupsfilters/test-pclm-overflow.sh b/cupsfilters/test-pclm-overflow.sh
+index 9269510..c7c003e 100755
+--- a/cupsfilters/test-pclm-overflow.sh
++++ b/cupsfilters/test-pclm-overflow.sh
+@@ -7,6 +7,17 @@ LIBTOOL="${BUILD_ROOT}/libtool"
+ CC="${CC:-cc}"
+ SAN_FLAGS="${SAN_FLAGS:--fsanitize=address -fno-omit-frame-pointer}"
+
++# AddressSanitizer is what makes this test meaningful. When libasan is not
++# installed the compiler still accepts -fsanitize=address but the link fails
++# (missing libasan_preinit.o / -lasan) -- that is an environment gap, not a
++# libcupsfilters bug. Skip (Automake exit 77) instead of failing; a real
++# failure is reported only when ASan IS available and the sanitizer fires.
++if ! printf 'int main(void){return 0;}\n' \
++ | "${CC}" ${SAN_FLAGS} -x c - -o /dev/null >/dev/null 2>&1; then
++ echo "AddressSanitizer not available (cannot link ${SAN_FLAGS}); skipping." >&2
++ exit 77
++fi
++
+ if [[ ! -x "${LIBTOOL}" ]]; then
+ echo "libtool helper not found at ${LIBTOOL}" >&2
+ exit 99
+diff --git a/cupsfilters/test-pdftoraster-copy-height.sh b/cupsfilters/test-pdftoraster-copy-height.sh
+deleted file mode 100755
+index 3455ef1..0000000
+--- a/cupsfilters/test-pdftoraster-copy-height.sh
++++ /dev/null
+@@ -1,16 +0,0 @@
+-#!/usr/bin/env bash
+-#
+-# Test that pdftoraster copy_height fix works correctly.
+-# This reproduces the off-by-one logic without needing ASan.
+-set -euo pipefail
+-
+-SRC="$(dirname "$0")/test-pdftoraster-copy-height.c"
+-BIN="/tmp/test-pdftoraster-copy-height"
+-
+-# Compile if needed
+-if [ ! -x "$BIN" ] || [ "$SRC" -nt "$BIN" ]; then
+- "${CC:-cc}" -std=c11 -O0 -g -Wall -Wextra \
+- "$SRC" -o "$BIN"
+-fi
+-
+-exec "$BIN"
diff --git a/0001-Fix-out-of-bounds-write-in-cfFilterPDFToRaster.patch b/0001-Fix-out-of-bounds-write-in-cfFilterPDFToRaster.patch
deleted file mode 100644
index 27148cf..0000000
--- a/0001-Fix-out-of-bounds-write-in-cfFilterPDFToRaster.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From fd01543f372ca3ba1f1c27bd3427110fa0094e3f Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Mon, 10 Nov 2025 21:10:56 +0100
-Subject: [PATCH] Fix out-of-bounds write in cfFilterPDFToRaster()
-
-PDFs with too large page dimensions could cause an integer overflow and then a too small buffer for the pixel line to be allocated.
-
-Fixed this by cropping the page size to the maximum allowed by the standard, 14400x14400pt, 200x200in, 5x5m
-
-https://community.adobe.com/t5/indesign-discussions/maximum-width-of-a-pdf/td-p/9217372
-
-Fixes CVE-2025-64503
----
- cupsfilters/pdftoraster.cxx | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/cupsfilters/pdftoraster.cxx b/cupsfilters/pdftoraster.cxx
-index fca1b486..56616c27 100644
---- a/cupsfilters/pdftoraster.cxx
-+++ b/cupsfilters/pdftoraster.cxx
-@@ -1814,6 +1814,20 @@ out_page(pdftoraster_doc_t *doc,
- doc->header.cupsPageSize[0] = l;
- else
- doc->header.cupsPageSize[1] = l;
-+
-+ //
-+ // Maximum allowed page size for PDF is 200x200 inches (~ 5x5 m), or 14400x14400 pt
-+ // https://community.adobe.com/t5/indesign-discussions/maximum-width-of-a-pdf/td-p/9217372
-+ //
-+ if (doc->header.cupsPageSize[0] > 14400) {
-+ fprintf(stderr, "ERROR: Page width is %.2fpt, too large, cropping to 14400pt\n", doc->header.cupsPageSize[0]);
-+ doc->header.cupsPageSize[0] = 14400;
-+ }
-+ if (doc->header.cupsPageSize[1] > 14400) {
-+ fprintf(stderr, "ERROR: Page height is %.2fpt, too large, cropping to 14400pt\n", doc->header.cupsPageSize[1]);
-+ doc->header.cupsPageSize[1] = 14400;
-+ }
-+
- if (rotate == 90 || rotate == 270)
- {
- doc->header.cupsImagingBBox[0] =
---
-2.51.1
-
diff --git a/0001-Makefile.am-Ensure-gen-lorem-text-test-supports-out-.patch b/0001-Makefile.am-Ensure-gen-lorem-text-test-supports-out-.patch
new file mode 100644
index 0000000..fed2ea1
--- /dev/null
+++ b/0001-Makefile.am-Ensure-gen-lorem-text-test-supports-out-.patch
@@ -0,0 +1,32 @@
+From e6dccfc6e7b608a1bf0c0e2db0da0b02c6463649 Mon Sep 17 00:00:00 2001
+From: Tom Pollard <tom_pollard@hotmail.co.uk>
+Date: Fri, 7 Aug 2026 19:27:32 +0100
+Subject: [PATCH] Makefile.am: Ensure gen-lorem-text test supports out of tree
+ builds (#205)
+
+For out of tree builds, the target directory needs to exist for the
+generator to write the file to, fixes:
+
+```
+./gen-lorem-text > cupsfilters/test_files/test_text_lorem.txt
+/bin/sh: line 1: cupsfilters/test_files/test_text_lorem.txt: No such file or directory
+```
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index e2238320..175d1ef1 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -348,6 +348,7 @@ BUILT_SOURCES = cupsfilters/test_files/test_text_lorem.txt
+ CLEANFILES = cupsfilters/test_files/test_text_lorem.txt
+
+ cupsfilters/test_files/test_text_lorem.txt: gen-lorem-text
++ $(MKDIR_P) $(@D)
+ $(AM_V_GEN)./gen-lorem-text > $@
+
+ EXTRA_DIST += \
+--
+2.55.0
+
diff --git a/0001-configure.ac-Drop-mandatory-C-compiler.patch b/0001-configure.ac-Drop-mandatory-C-compiler.patch
new file mode 100644
index 0000000..85feea7
--- /dev/null
+++ b/0001-configure.ac-Drop-mandatory-C-compiler.patch
@@ -0,0 +1,58 @@
+From 08f747f2438ce302b94c1c96e77c15e6eef1c515 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 6 Aug 2026 15:11:01 +0200
+Subject: [PATCH] configure.ac: Drop mandatory C++ compiler
+
+We no longer compile C++ in libcupsfilters, do not require it during
+configure.
+---
+ configure.ac | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 88df4f7e..19abc88a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ m4_include([m4/ax_compare_version.m4])
+ m4_include([m4/basic-directories.m4])
+ AM_INIT_AUTOMAKE([1.11 gnu dist-xz dist-bzip2 subdir-objects foreign])
+ AM_SILENT_RULES([yes])
+-AC_LANG([C++])
++AC_LANG([C])
+ AC_CONFIG_HEADERS([config.h])
+ # Extra defines for the config.h
+ AH_BOTTOM([
+@@ -50,11 +50,8 @@ AH_BOTTOM([
+ # Find required base packages
+ # ===========================
+ AC_PROG_CC
+-AC_PROG_CXX
+-AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory])
+ AM_PROG_CC_C_O
+ AM_ICONV
+-AC_PROG_CPP
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+@@ -566,10 +563,8 @@ AS_IF([test x"$enable_werror" = "xyes"], [
+ AS_IF([test x"$GCC" = "xyes"], [
+ # Be tough with warnings and produce less careless code
+ CFLAGS="$CFLAGS -Wall -std=gnu11"
+- CXXFLAGS="$CXXFLAGS -Wall " # -Weffc++" # TODO: enable when it does not print 1MB of warnings
+ ])
+ CFLAGS="$CFLAGS -D_GNU_SOURCE"
+-CXXFLAGS="$CXXFLAGS -std=c++17"
+
+ # =========
+ # CJK FONTS
+@@ -601,7 +596,6 @@ AC_MSG_NOTICE([
+ ==============================================================================
+ Environment settings:
+ CFLAGS: ${CFLAGS}
+- CXXFLAGS: ${CXXFLAGS}
+ LDFLAGS: ${LDFLAGS}
+ Build configuration:
+ libcups: ${CUPS_VERSION}
+--
+2.55.0
+
diff --git a/0001-configure.ac-Make-CJK-fonts-name-configurable.patch b/0001-configure.ac-Make-CJK-fonts-name-configurable.patch
deleted file mode 100644
index 753f3ec..0000000
--- a/0001-configure.ac-Make-CJK-fonts-name-configurable.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index ddebb5b..913457f 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -21,7 +21,9 @@ EXTRA_DIST = \
- $(doc_DATA) \
- autogen.sh \
- config.rpath \
-- libcupsfilters.pc.in
-+ libcupsfilters.pc.in \
-+ pdf.utf-8.heavy.in \
-+ pdf.utf-8.simple.in
-
- EXTRA_DIST += \
- data/makePDFfromPS.sh \
-diff --git a/charset/pdf.utf-8.heavy b/charset/pdf.utf-8.heavy.in
-similarity index 98%
-rename from charset/pdf.utf-8.heavy
-rename to charset/pdf.utf-8.heavy.in
-index a610af0..6815388 100644
---- a/charset/pdf.utf-8.heavy
-+++ b/charset/pdf.utf-8.heavy.in
-@@ -36,5 +36,5 @@ charset utf8
- 1E00 1EFF ltor single CourierNew CourierNew:bold CourierNew:italic CourierNew:bold:italic
- 2000 21FF ltor single DejaVuSansMono DejaVuSansMono:bold DejaVuSansMono:oblique DejaVuSansMono:bold:oblique
- 2200 23FF ltor single Symbol
--3000 9FFF ltor double ARPLUMingCN
-+3000 9FFF ltor double @CJKFONTS@
- #0400 04FF ltor single FreeMono FreeMono:bold FreeMono:oblique FreeMono:bold:oblique
-diff --git a/charset/pdf.utf-8.simple b/charset/pdf.utf-8.simple.in
-similarity index 97%
-rename from charset/pdf.utf-8.simple
-rename to charset/pdf.utf-8.simple.in
-index f7d3adf..d66aa29 100644
---- a/charset/pdf.utf-8.simple
-+++ b/charset/pdf.utf-8.simple.in
-@@ -30,4 +30,4 @@ charset utf8
-
- 0000 04FF ltor single monospace monospace:bold monospace:oblique monospace:bold:oblique
- 0500 05FF rtol single monospace
--3000 9FFF ltor double ARPLUmingCN
-+3000 9FFF ltor double @CJKFONTS@
-diff --git a/configure.ac b/configure.ac
-index f652f04..0c24b19 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -464,12 +464,26 @@ CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE -DPOINTERHOLDER_TRANSITION=0"
- # See /usr/include/qpdf/PointerHolder.hh
- CXXFLAGS="$CXXFLAGS -std=c++17"
-
-+# =========
-+# CJK FONTS
-+# =========
-+AC_ARG_WITH([cjk-fonts],
-+ [AS_HELP_STRING([--with-cjk-fonts=value], [Set font name for CJK fonts (default: ARPLUmingCN).])],
-+ [AS_IF([test "x$withval" != "x" -a "x$withval" != "xyes" -a "x$withval" != "xno"],
-+ [CJKFONTS="$withval"],
-+ [CJKFONTS="ARPLUmingCN"])],
-+ [CJKFONTS="ARPLUmingCN"])
-+
-+AC_SUBST([CJKFONTS])
-+
- # =====================
- # Prepare all .in files
- # =====================
- AC_CONFIG_FILES([
- libcupsfilters.pc
- Makefile
-+ charset/pdf.utf-8.heavy
-+ charset/pdf.utf-8.simple
- ])
- AC_OUTPUT
-
-@@ -499,5 +513,6 @@ Build configuration:
- dbus: ${enable_dbus}
- werror: ${enable_werror}
- test-font: ${with_test_font_path}
-+ cjk-fonts: ${CJKFONTS}
- ==============================================================================
- ])
diff --git a/0001-configure.ac-Remove-poppler-cpp-remaining-code.patch b/0001-configure.ac-Remove-poppler-cpp-remaining-code.patch
new file mode 100644
index 0000000..3a7c604
--- /dev/null
+++ b/0001-configure.ac-Remove-poppler-cpp-remaining-code.patch
@@ -0,0 +1,106 @@
+From 27ccf46b5bfd9170eb072c428440d3fc76daa8eb Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Thu, 6 Aug 2026 16:00:48 +0200
+Subject: [PATCH] configure.ac: Remove poppler-cpp remaining code
+
+pdftoraster uses pdfio now as well, so poppler-cpp is not needed
+anymore.
+---
+ Makefile.am | 5 -----
+ configure.ac | 12 ------------
+ cupsfilters/universal.c | 10 ++++------
+ 3 files changed, 4 insertions(+), 23 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index f0b098f8..f4d5c3af 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -214,10 +214,6 @@ libcupsfilters_la_LIBADD = \
+ $(LIBPNG_LIBS) \
+ $(TIFF_LIBS) \
+ -lm
+-if ENABLE_POPPLER
+-libcupsfilters_la_LIBADD += \
+- $(POPPLER_LIBS)
+-endif
+ libcupsfilters_la_CFLAGS = \
+ -I$(srcdir)/cupsfilters/fontembed/ \
+ $(FONTCONFIG_CFLAGS) \
+@@ -235,7 +231,6 @@ libcupsfilters_la_LDFLAGS = \
+ $(LIBJXL_LIBS)
+ if BUILD_DBUS
+ libcupsfilters_la_CFLAGS += $(DBUS_CFLAGS) -DHAVE_DBUS
+-libcupsfilters_la_CXXFLAGS = -std=c++11 $(libcupsfilters_la_CFLAGS) # -std=c++11
+ libcupsfilters_la_LIBADD += $(DBUS_LIBS)
+ endif
+
+diff --git a/configure.ac b/configure.ac
+index 19abc88a..7ef2a37a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -373,18 +373,6 @@ AS_IF([test x"$with_fontconfig" != "xno" && test "x$enable_texttopdf" != "xno"],
+ PKG_CHECK_MODULES([LIBPDFIO], [pdfio >= 1.6.4])
+
+
+-# =================
+-# Check for Poppler
+-# =================
+-AC_ARG_ENABLE(poppler, AS_HELP_STRING([--enable-poppler],[enable Poppler-based filters]),
+- enable_poppler=$enableval,enable_poppler=yes)
+-AM_CONDITIONAL([ENABLE_POPPLER], test x$enable_poppler = xyes)
+-if test x$enable_poppler = xyes; then
+- PKG_CHECK_MODULES([POPPLER], [poppler-cpp >= 0.19])
+- AC_CHECK_HEADER([poppler/cpp/poppler-version.h], [AC_DEFINE([HAVE_CPP_POPPLER_VERSION_H],[1],[Define if you have Poppler's "cpp/poppler-version.h" header file.])], [])
+- AC_DEFINE([HAVE_POPPLER], [1], [Define that we provide Poppler library])
+-fi
+-
+ # ===============
+ # Check for D-Bus
+ # ===============
+diff --git a/cupsfilters/universal.c b/cupsfilters/universal.c
+index 0e7251f7..69488741 100644
+--- a/cupsfilters/universal.c
++++ b/cupsfilters/universal.c
+@@ -270,7 +270,7 @@ cfFilterUniversal(int inputfd, // I - File descriptor input stream
+ "cfFilterUniversal: Adding %s to chain", filter->name);
+ }
+
+-#if defined(HAVE_GHOSTSCRIPT) || defined(HAVE_POPPLER)
++#if defined(HAVE_GHOSTSCRIPT)
+ if (strcasecmp(output_type, "vnd.cups-pdf"))
+ {
+ if (!strcasecmp(output_type, "vnd.cups-raster") ||
+@@ -296,7 +296,6 @@ cfFilterUniversal(int inputfd, // I - File descriptor input stream
+ "cfFilterUniversal: Adding %s to chain",
+ filter->name);
+ # else
+-# ifdef HAVE_POPPLER
+ filter = malloc(sizeof(cf_filter_filter_in_chain_t));
+ filter->function = cfFilterPDFToRaster;
+ filter->parameters = NULL;
+@@ -317,19 +316,18 @@ cfFilterUniversal(int inputfd, // I - File descriptor input stream
+ if (log) log(ld, CF_LOGLEVEL_DEBUG,
+ "cfFilterUniversal: Adding %s to chain", filter->name);
+ }
+-# endif // HAVE_POPPLER
+ # endif // HAVE_GHOSTSCRIPT
+ }
+ else
+ {
+-#endif // HAVE_GHOSTSCRIPT || HAVE_POPPLER
++#endif // HAVE_GHOSTSCRIPT
+ // Output format is not PDF and unknown -> Error
+ ret = 1;
+ goto out;
+-#if defined(HAVE_GHOSTSCRIPT) || defined(HAVE_POPPLER)
++#if defined(HAVE_GHOSTSCRIPT)
+ }
+ }
+-#endif // HAVE_GHOSTSCRIPT || HAVE_POPPLER
++#endif // HAVE_GHOSTSCRIPT
+ }
+ }
+
+--
+2.55.0
+
diff --git a/0001-ieee.c-Fix-possible-infinite-loop-and-avoid-empty-de.patch b/0001-ieee.c-Fix-possible-infinite-loop-and-avoid-empty-de.patch
deleted file mode 100644
index b15bacc..0000000
--- a/0001-ieee.c-Fix-possible-infinite-loop-and-avoid-empty-de.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 4b343522823403df01f6753082df83f07d18c217 Mon Sep 17 00:00:00 2001
-From: zdohnal <zdohnal@redhat.com>
-Date: Thu, 23 Jul 2026 16:54:46 +0200
-Subject: [PATCH] ieee.c: Fix possible infinite loop and avoid empty device_ids
- (#170)
-
-If model in device id was empty, library got into infinite loop. There
-are several layers of protection now:
-
-- library now does not allow empty strings for key or value
-- device ids without values are thrown away
-- comparison now happens only when there is actual string to compare
- with, aka length > 0
-
-Fixes: CVE-2026-64611
----
- cupsfilters/ieee1284.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/cupsfilters/ieee1284.c b/cupsfilters/ieee1284.c
-index 57abee09..7ab5ac6b 100644
---- a/cupsfilters/ieee1284.c
-+++ b/cupsfilters/ieee1284.c
-@@ -407,6 +407,12 @@ cfIEEE1284GetMakeModel(
-
- num_values = cfIEEE1284GetValues(device_id, &values);
-
-+ if (!num_values)
-+ {
-+ DEBUG_puts("cfIEEE1284GetMakeModel: no key:value pairs");
-+ return (-1);
-+ }
-+
- if ((mdl = cupsGetOption("MODEL", num_values, values)) == NULL)
- mdl = cupsGetOption("MDL", num_values, values);
-
-@@ -573,6 +579,9 @@ cfIEEE1284GetValues(
- *ptr = '\0';
- device_id ++;
-
-+ if (!key[0] || !value[0])
-+ continue;
-+
- num_values = cupsAddOption(key, value, num_values, values);
- }
-
-@@ -668,6 +677,7 @@ cfIEEE1284NormalizeMakeModel(
- char *bufptr; // Pointer into buffer
- char sepchr = ' '; // Word separator character
- int compare = 0, // Format for comparing
-+ compare_len = 0, // Length of compared buffer
- human = 0, // Format for human-readable string
- lower = 0, // All letters lowercase
- upper = 0, // All letters uppercase
-@@ -1151,7 +1161,8 @@ cfIEEE1284NormalizeMakeModel(
- // Remove repeated manufacturer names...
- //
-
-- while (strncasecmp(buffer, modelptr, modelptr - buffer) == 0)
-+ compare_len = modelptr - buffer;
-+ while (compare_len > 0 && strncasecmp(buffer, modelptr, compare_len) == 0)
- move_right_part(buffer, bufsize, modelptr, buffer - modelptr);
-
- //
---
-2.55.0
-
diff --git a/0001-image-png.c-Handle-libpng-errors-via-longjmp-setjmp-.patch b/0001-image-png.c-Handle-libpng-errors-via-longjmp-setjmp-.patch
deleted file mode 100644
index 4a03eeb..0000000
--- a/0001-image-png.c-Handle-libpng-errors-via-longjmp-setjmp-.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From e8888af31419acbd0cbcc8340f41a383f35aae12 Mon Sep 17 00:00:00 2001
-From: zdohnal <zdohnal@redhat.com>
-Date: Thu, 23 Jul 2026 12:50:20 +0200
-Subject: [PATCH] image-png.c: Handle libpng errors via longjmp()/setjmp()
- (#168)
-
-Libpng expects callers to set their own error handlers if they don't
-want to abort the whole process, and this has to be handled by
-longjmp()/setjmp().
-
-It follows the C standard, so any C-standard compliant compiler should
-work fine. Setting pointers as volatile is to prevent possible undefined
-behavior.
-
-Fixes CVE-2026-64612
-
-Assisted-by: Claude Code by Anthropic
----
- cupsfilters/image-png.c | 73 ++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 68 insertions(+), 5 deletions(-)
-
-diff --git a/cupsfilters/image-png.c b/cupsfilters/image-png.c
-index a6fd9a6d..9f482faf 100644
---- a/cupsfilters/image-png.c
-+++ b/cupsfilters/image-png.c
-@@ -20,6 +20,35 @@
-
- #ifdef HAVE_LIBPNG
- # include <png.h> // Portable Network Graphics (PNG) definitions
-+# include <setjmp.h>
-+
-+
-+//
-+// Custom error handler for libpng — longjmp() back to the setjmp()
-+// point in the caller instead of the default abort(), so a malformed
-+// PNG results in a graceful error return.
-+//
-+
-+static void
-+cf_image_png_error_callback(png_structp png,
-+ png_const_charp error_msg)
-+{
-+ DEBUG_printf(("DEBUG: libpng error: %s\n", error_msg));
-+ longjmp(png_jmpbuf(png), 1);
-+}
-+
-+
-+//
-+// Custom warning handler for libpng — log non-fatal issues
-+// and return normally so processing continues.
-+//
-+
-+static void
-+cf_image_png_warning_callback(png_structp png,
-+ png_const_charp warning_msg)
-+{
-+ DEBUG_printf(("DEBUG: libpng warning: %s\n", warning_msg));
-+}
-
-
- //
-@@ -51,18 +80,52 @@ _cfImageReadPNG(
- int bpp; // Bytes per pixel
- int pass, // Current pass
- passes; // Number of passes required
-- cf_ib_t *in, // Input pixels
-- *inptr, // Pointer into pixels
-- *out; // Output pixels
-+ cf_ib_t * volatile in = NULL; // Input pixels (volatile for setjmp)
-+ cf_ib_t *inptr; // Pointer into pixels
-+ cf_ib_t * volatile out = NULL; // Output pixels (volatile for setjmp)
- png_color_16 bg; // Background color
-
-
- //
-- // Setup the PNG data structures...
-+ // Setup the PNG data structures with custom error/warning handlers
-+ // so that a malformed PNG causes an error return instead of abort().
-+ // Errors during struct creation are handled internally by libpng
-+ // and result in a NULL return. Errors in any png_*() call after
-+ // setjmp() trigger our error callback which longjmp()s back.
- //
-
-- pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-+ pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL,
-+ cf_image_png_error_callback,
-+ cf_image_png_warning_callback);
-+ if (pp == NULL)
-+ {
-+ fclose(fp);
-+ return (1);
-+ }
-+
- info = png_create_info_struct(pp);
-+ if (info == NULL)
-+ {
-+ png_destroy_read_struct(&pp, NULL, NULL);
-+ fclose(fp);
-+ return (1);
-+ }
-+
-+ //
-+ // Error handling jump point — if any png_*() call below triggers
-+ // png_error(), our callback longjmp()s back here. The 'in' and
-+ // 'out' pointers are initialized to NULL so free() is safe here
-+ // even if longjmp() reverts them (C11 §7.13.2.1).
-+ //
-+
-+ if (setjmp(png_jmpbuf(pp)))
-+ {
-+ free(in);
-+ free(out);
-+ png_destroy_read_struct(&pp, &info, NULL);
-+ fclose(fp);
-+ return (1);
-+ }
-
- //
- // Initialize the PNG read "engine"...
---
-2.55.0
-
diff --git a/lcf-CVE-2025-57812.patch b/lcf-CVE-2025-57812.patch
deleted file mode 100644
index 56eaa27..0000000
--- a/lcf-CVE-2025-57812.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From b69dfacec7f176281782e2f7ac44f04bf9633cfa Mon Sep 17 00:00:00 2001
-From: zdohnal <zdohnal@redhat.com>
-Date: Mon, 10 Nov 2025 18:58:31 +0100
-Subject: [PATCH] Merge commit from fork
-
-* Fix heap-buffer overflow write in cfImageLut
-
-1. fix for CVE-2025-57812
-
-* Reject color images with 1 bit per sample
-
-2. fix for CVE-2025-57812
-
-* Reject images where the number of samples does not correspond with the color space
-
-3. fix for CVE-2025-57812
-
-* Reject images with planar color configuration
-
-4. fix for CVE-2025-57812
-
-* Reject images with vertical scanlines
-
-5. fix for CVE-2025-57812
-
----------
-
-Co-authored-by: Till Kamppeter <till.kamppeter@gmail.com>
----
- cupsfilters/image-tiff.c | 46 +++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 45 insertions(+), 1 deletion(-)
-
-diff --git a/cupsfilters/image-tiff.c b/cupsfilters/image-tiff.c
-index 20dfbaee..748e2db6 100644
---- a/cupsfilters/image-tiff.c
-+++ b/cupsfilters/image-tiff.c
-@@ -41,6 +41,7 @@ _cfImageReadTIFF(
- TIFF *tif; // TIFF file
- uint32_t width, height; // Size of image
- uint16_t photometric, // Colorspace
-+ planar, // Color components in separate planes
- compression, // Type of compression
- orientation, // Orientation
- resunit, // Units for resolution
-@@ -113,6 +114,15 @@ _cfImageReadTIFF(
- return (-1);
- }
-
-+ if (TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planar) &&
-+ planar == PLANARCONFIG_SEPARATE)
-+ {
-+ fputs("DEBUG: Images with planar color configuration are not supported!\n", stderr);
-+ TIFFClose(tif);
-+ fclose(fp);
-+ return (1);
-+ }
-+
- if (!TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression))
- {
- DEBUG_puts("DEBUG: No compression tag in the file!\n");
-@@ -127,6 +137,15 @@ _cfImageReadTIFF(
- if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bits))
- bits = 1;
-
-+ if (bits == 1 && samples > 1)
-+ {
-+ fprintf(stderr, "ERROR: Color images with 1 bit per sample not supported! "
-+ "Samples per pixel: %d; Bits per sample: %d\n", samples, bits);
-+ TIFFClose(tif);
-+ fclose(fp);
-+ return (1);
-+ }
-+
- //
- // Get the image orientation...
- //
-@@ -193,6 +212,23 @@ _cfImageReadTIFF(
- else
- alpha = 0;
-
-+ //
-+ // Check whether number of samples per pixel corresponds with color space
-+ //
-+
-+ if ((photometric == PHOTOMETRIC_RGB && (samples < 3 || samples > 4)) ||
-+ (photometric == PHOTOMETRIC_SEPARATED && samples != 4))
-+ {
-+ fprintf(stderr, "DEBUG: Number of samples per pixel does not correspond to color space! "
-+ "Color space: %s; Samples per pixel: %d\n",
-+ (photometric == PHOTOMETRIC_RGB ? "RGB" :
-+ (photometric == PHOTOMETRIC_SEPARATED ? "CMYK" : "Unknown")),
-+ samples);
-+ TIFFClose(tif);
-+ fclose(fp);
-+ return (1);
-+ }
-+
- //
- // Check the size of the image...
- //
-@@ -265,6 +301,14 @@ _cfImageReadTIFF(
- break;
- }
-
-+ if (orientation >= ORIENTATION_LEFTTOP)
-+ {
-+ fputs("ERROR: TIFF files with vertical scanlines are not supported!\n", stderr);
-+ TIFFClose(tif);
-+ fclose(fp);
-+ return (-1);
-+ }
-+
- switch (orientation)
- {
- case ORIENTATION_TOPRIGHT :
-@@ -1493,7 +1537,7 @@ _cfImageReadTIFF(
- }
-
- if (lut)
-- cfImageLut(out, img->xsize * 3, lut);
-+ cfImageLut(out, img->xsize * bpp, lut);
-
- _cfImagePutRow(img, 0, y, img->xsize, out);
- }
---
-2.51.1
-
diff --git a/libcupsfilters.spec b/libcupsfilters.spec
index 93bfe1c..513c9d0 100644
--- a/libcupsfilters.spec
+++ b/libcupsfilters.spec
@@ -1,11 +1,13 @@
%global _hardened_build 1
-%global upstream_version 2.1.1
+%global upstream_version 2.2.0
+
+%bcond jpegxl %{undefined rhel}
Name: libcupsfilters
Epoch: 1
-Version: 2.1.1
-Release: 9%{?dist}
+Version: 2.2.0
+Release: 1%{?dist}
Summary: Library for developing printing filters
# the CUPS exception text is the same as LLVM exception, so using that name with
# agreement from legal team
@@ -14,18 +16,16 @@ License: Apache-2.0 WITH LLVM-exception
URL: https://github.com/OpenPrinting/libcupsfilters
Source0: %{URL}/releases/download/%{version}/%{name}-%{version}.tar.gz
-
-# Patches
-# https://github.com/OpenPrinting/libcupsfilters/pull/96
-Patch001: 0001-configure.ac-Make-CJK-fonts-name-configurable.patch
-# CVE-2025-57812
-Patch002: lcf-CVE-2025-57812.patch
-# CVE-2025-64503
-Patch003: 0001-Fix-out-of-bounds-write-in-cfFilterPDFToRaster.patch
-# CVE-2026-64611
-Patch004: 0001-ieee.c-Fix-possible-infinite-loop-and-avoid-empty-de.patch
-# CVE-2026-64612
-Patch005: 0001-image-png.c-Handle-libpng-errors-via-longjmp-setjmp-.patch
+# https://github.com/OpenPrinting/libcupsfilters/pull/202
+# drop unneeded poppler-cpp and c++ dpes
+Patch001: 0001-configure.ac-Drop-mandatory-C-compiler.patch
+Patch002: 0001-configure.ac-Remove-poppler-cpp-remaining-code.patch
+# https://github.com/OpenPrinting/libcupsfilters/pull/204/
+# Fix running regression tests - one is skipped, other removed
+Patch003: 0001-Fix-2.2.0-test-packaging-and-CUPS-datadir-detection-.patch
+# https://github.com/OpenPrinting/libcupsfilters/commit/e6dccfc6e7b60
+# support out of tree builds
+Patch004: 0001-Makefile.am-Ensure-gen-lorem-text-test-supports-out-.patch
# for generating configure and Makefile scripts in autogen.h
@@ -36,8 +36,6 @@ BuildRequires: automake
BuildRequires: dejavu-sans-fonts
# most filter functions written in C
BuildRequires: gcc
-# pdftopdf written in C++
-BuildRequires: gcc-c++
# for generating configure and Makefile scripts in autogen.h
BuildRequires: gettext-devel
# we use gs binary in filter functions, so it could be only runtime
@@ -68,12 +66,17 @@ BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(libjpeg)
# for png file format support
BuildRequires: pkgconfig(libpng)
-# for pdf filter functions
-BuildRequires: pkgconfig(libqpdf) >= 10.3.2
# for tiff image support
BuildRequires: pkgconfig(libtiff-4)
-# for pdftoraster filter
-BuildRequires: pkgconfig(poppler-cpp)
+# for pdf filter functions - replaces qpdf
+BuildRequires: pkgconfig(pdfio) >= 1.6.4
+# for pdftoppm
+BuildRequires: poppler-utils
+
+%if %{with jpegxl}
+# for JPEG XL image support
+BuildRequires: pkgconfig(libjxl) >= 0.7.0
+%endif
# remove once CentOS Stream 10 is released
Obsoletes: cups-filters-libs < 2.0
@@ -128,7 +131,11 @@ Development files for OpenPrinting cupsfilters library.
--disable-silent-rules\
--disable-static\
--enable-dbus\
- --with-cjk-fonts=droidsansfallback
+ --with-cjk-fonts=droidsansfallback\
+%if %{without jpegxl}
+ --without-jpegxl\
+%endif
+ %{nil}
# fix rpmlint error about linking to libraries, but not actually using their functions
# it happens when the required libraries uses pkgconfig - pkgconfig file doesn't know
@@ -204,6 +211,9 @@ rm -f %{buildroot}%{_pkgdocdir}/{LICENSE,COPYING,NOTICE}
%changelog
+* Thu Aug 06 2026 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.0-1
+- libcupsfilters-2.2.0 is available (fedora#2511889)
+
* Wed Aug 05 2026 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.1.1-9
- fixes CVE-2026-64611 and CVE-2026-64612 (fedora#2506364)
diff --git a/sources b/sources
index 81672cf..3b54946 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libcupsfilters-2.1.1.tar.gz) = 389a92888cb397c5d588e37429517a4d0d3ac483c9fe02f772d82ae33195c4bfb7b465ba21f360df3fffbd3d3a481de6232a6f2c370738e7cc9d5e84dd410ad0
+SHA512 (libcupsfilters-2.2.0.tar.gz) = 69ab4702fffc662fa19ec29c635e21b76fc05dd0e2a53db889b58709cd6b0f2f3d62307ef8ea0e1bae5715972bdcca33efb9f7af270ec2074749e47f6d43a302
reply other threads:[~2026-08-10 11:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178635984332.1.9153166541565217047.rpms-libcupsfilters-0594b595e2fb@fedoraproject.org \
--to=zdohnal@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox