]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
ghostscript: Fix compilation with GCC 14
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Aug 2024 13:57:39 +0000 (13:57 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 19 Aug 2024 10:01:01 +0000 (10:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/ghostscript
src/patches/ghostscript-10.03.1-bug707649.patch [new file with mode: 0644]

index f198a0d1bf53634a99a92d6b3cb0005d61137c14..0709f1800fe3970790b3b5edd9c52e3d0732f46a 100644 (file)
@@ -89,6 +89,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
        cd $(DIR_APP) && rm -rf expat freetype icclib jasper jpeg jpegxr \
                lcms lcms2 libpng openjpeg zlib cups/libs
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ghostscript-10.03.1-bug707649.patch
        cd $(DIR_APP) && \
                ./configure \
                        --prefix=/usr \
diff --git a/src/patches/ghostscript-10.03.1-bug707649.patch b/src/patches/ghostscript-10.03.1-bug707649.patch
new file mode 100644 (file)
index 0000000..0d6fb75
--- /dev/null
@@ -0,0 +1,29 @@
+From 90cabe08422afdd16bac5dd9217602679d943045 Mon Sep 17 00:00:00 2001
+From: Ken Sharp <Ken.Sharp@artifex.com>
+Date: Fri, 8 Mar 2024 09:19:05 +0000
+Subject: Bug #707649 - fix apply_sasl in error cases.
+
+Forgot to dereference the pointers before assigning the values, if we
+get non-fatal errors returned from stringprep.
+---
+ pdf/pdf_sec.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pdf/pdf_sec.c b/pdf/pdf_sec.c
+index 565ae80ca..7e8f6719d 100644
+--- a/pdf/pdf_sec.c
++++ b/pdf/pdf_sec.c
+@@ -183,8 +183,8 @@ static int apply_sasl(pdf_context *ctx, char *Password, int Len, char **NewPassw
+          * this easy: the errors we want to ignore are the ones with
+          * codes less than 100. */
+         if ((int)err < 100) {
+-            NewPassword = Password;
+-            NewLen = Len;
++            *NewPassword = Password;
++            *NewLen = Len;
+             return 0;
+         }
+-- 
+cgit v1.2.3
+