diff --git a/netpbm-c99-2.patch b/netpbm-c99-2.patch new file mode 100644 index 0000000..bcb8a99 --- /dev/null +++ b/netpbm-c99-2.patch @@ -0,0 +1,41 @@ +Remove the contents of libjasper_compat.c. The assignment + + *errorP = errorP; + +is bogus because it creates a non-null value in *errorP even on +success, and the caller expects a null pointer int his case. + +The source file is compiled, but not actually linked in, so this is +only a problem because of the type error that fails the build. + +diff --git a/converter/other/jpeg2000/libjasper_compat.c b/converter/other/jpeg2000/libjasper_compat.c +index 101820a321212dc6..e69de29bb2d1d643 100644 +--- a/converter/other/jpeg2000/libjasper_compat.c ++++ b/converter/other/jpeg2000/libjasper_compat.c +@@ -1,26 +0,0 @@ +-#include "netpbm/nstring.h" +- +-#include "jasper/jasper.h" +-#include "jasper/jas_image.h" +- +-#ifndef JAS_HAVE_PMJAS_IMAGE_DECODE +- +-void +-pmjas_image_decode(jas_stream_t * const in, +- int const fmtArg, +- const char * const optstr, +- jas_image_t ** const imagePP, +- const char ** const errorP) { +- +- jas_image_t * const jasperP = jas_image_decode(in, fmtArg, optstr); +- +- if (jasperP) { +- *imagePP = jasperP; +- *errorP = errorP; +- } else { +- pm_asprintf(errorP, "Failed. Details may have been written to " +- "Standard Error"); +- } +-} +- +-#endif diff --git a/netpbm-cmuwtopbm.patch b/netpbm-cmuwtopbm.patch deleted file mode 100644 index f5b328b..0000000 --- a/netpbm-cmuwtopbm.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix netpbm-10.61.01/converter/pbm/cmuwmtopbm.c ---- netpbm-10.61.01/converter/pbm/cmuwmtopbm.c.cmuwtopbmfix 2013-01-02 18:39:57.000000000 +0100 -+++ netpbm-10.61.01/converter/pbm/cmuwmtopbm.c 2013-01-03 05:41:36.024984241 +0100 -@@ -18,7 +18,7 @@ - This program does not check the pad bits at the end of each row. - */ - -- -+#include - #include "pbm.h" - - /*-------------------------- -@@ -42,7 +42,7 @@ readCmuwmHeader(FILE * const ifP - "CMU window manager header EOF / read error"; - uint32_t const cmuwmMagic = 0xf10040bb; - -- long l; -+ uint32_t l; - short s; - int rc; - diff --git a/netpbm.spec b/netpbm.spec index 4a2328c..33547e2 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -1,7 +1,7 @@ Summary: A library for handling different graphics file formats Name: netpbm Version: 11.02.00 -Release: 4%{?dist} +Release: 5%{?dist} # See copyright_summary for details License: BSD and GPLv2 and IJG and MIT and Public Domain URL: http://netpbm.sourceforge.net/ @@ -24,12 +24,12 @@ Patch9: netpbm-xwdfix.patch Patch10: netpbm-multilib.patch Patch11: netpbm-glibc.patch Patch12: netpbm-docfix.patch -Patch13: netpbm-cmuwtopbm.patch Patch14: netpbm-pamtojpeg2k.patch Patch15: netpbm-manfix.patch Patch16: netpbm-jasper.patch Patch17: netpbm-libdir-so.patch Patch18: netpbm-c99.patch +Patch19: netpbm-c99-2.patch BuildRequires: make BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex, gcc, jbigkit-devel @@ -230,6 +230,11 @@ popd %doc userguide/* %changelog +* Sun Jan 21 2024 Florian Weimer - 11.02.00-5 +- GCC 14 compatibility fixes: + Drop netpbm-cmuwtopbm.patch to fix an out-of-bounds stack write (#2259450) + Stub out unused converter/other/jpeg2000/libjasper_compat.c (#2259448) + * Sun Jan 21 2024 Fedora Release Engineering - 11.02.00-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild