From 6f30ed98a28623299805fe5ea139d85e543fba80 Mon Sep 17 00:00:00 2001 From: Richard Lescak Date: Thu, 24 Feb 2022 13:25:44 +0100 Subject: [PATCH] Fix patch for covscan issues Resolves: rhbz#2032789 --- ghostscript-9.54.0-covscan-fixes.patch | 23 +++++++++++++++-------- ghostscript.spec | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/ghostscript-9.54.0-covscan-fixes.patch b/ghostscript-9.54.0-covscan-fixes.patch index 5200842..1a4a016 100644 --- a/ghostscript-9.54.0-covscan-fixes.patch +++ b/ghostscript-9.54.0-covscan-fixes.patch @@ -1,7 +1,19 @@ +diff -ur ghostscript-9.54.0/base/gdevvec.c ghostscript-9.54.0-patched/base/gdevvec.c +--- ghostscript-9.54.0/base/gdevvec.c ++++ ghostscript-9.54.0-patched/base/gdevvec.c +@@ -643,7 +643,7 @@ + */ + int + gdev_vector_dopath_segment(gdev_vector_dopath_state_t *state, int pe_op, +- gs_fixed_point vs[3]) ++ gs_fixed_point *vs) + { + gx_device_vector *vdev = state->vdev; + const gs_matrix *const pmat = &state->scale_mat; diff -ur ghostscript-9.54.0/base/gdevvec.h ghostscript-9.54.0-patched/base/gdevvec.h ---- ghostscript-9.54.0/base/gdevvec.h 2021-03-30 09:40:28.000000000 +0200 -+++ ghostscript-9.54.0-patched/base/gdevvec.h 2021-10-29 13:13:54.856280644 +0200 -@@ -306,11 +306,11 @@ +--- ghostscript-9.54.0/base/gdevvec.h ++++ ghostscript-9.54.0-patched/base/gdevvec.h +@@ -306,7 +306,7 @@ /* Write a segment of a path using the default implementation. */ int gdev_vector_dopath_segment(gdev_vector_dopath_state_t *state, int pe_op, @@ -10,11 +22,6 @@ diff -ur ghostscript-9.54.0/base/gdevvec.h ghostscript-9.54.0-patched/base/gdevv typedef struct gdev_vector_path_seg_record_s { int op; -- gs_fixed_point vs[3]; -+ gs_fixed_point *vs; - } gdev_vector_path_seg_record; - - /* Write a polygon as part of a path (type = gx_path_type_none) */ diff -ur ghostscript-9.54.0/base/gxclpath.c ghostscript-9.54.0-patched/base/gxclpath.c --- ghostscript-9.54.0/base/gxclpath.c 2021-03-30 09:40:28.000000000 +0200 +++ ghostscript-9.54.0-patched/base/gxclpath.c 2021-11-23 11:06:14.670137576 +0100 diff --git a/ghostscript.spec b/ghostscript.spec index 450aba9..ab1e299 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -42,7 +42,7 @@ Name: ghostscript Summary: Interpreter for PostScript language & PDF Version: 9.54.0 -Release: 6%{?dist} +Release: 7%{?dist} License: AGPLv3+ @@ -439,6 +439,9 @@ done # ============================================================================= %changelog +* Thu Feb 24 2022 Richard Lescak - 9.54.0-7 +- Fix patch for covscan issues (#2032789) + * Tue Feb 22 2022 Richard Lescak - 9.54.0-6 - Added fix for vulnerability CVE-2021-45949 (#2049767)