From 952fb15c98b3a77440c6f572e2a58f503519a456 Mon Sep 17 00:00:00 2001 From: Ondrej Dubaj Date: Mon, 30 Aug 2021 10:57:41 +0200 Subject: [PATCH] Fixed CVE-2020-21683 Resolves: #1998594 --- 0010-CVE-2020-21683.patch | 25 +++++++++++++++++++++++++ transfig.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 0010-CVE-2020-21683.patch diff --git a/0010-CVE-2020-21683.patch b/0010-CVE-2020-21683.patch new file mode 100644 index 0000000..dfe1434 --- /dev/null +++ b/0010-CVE-2020-21683.patch @@ -0,0 +1,25 @@ +Subject: [PATCH] Fix pstricks fill with non-solid default color + +In the pstricks output, filling an area with the shaded or tinted default color +is now equivalent to filling with shaded or tinted black color. +--- + fig2dev/dev/genpstricks.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/fig2dev/dev/genpstricks.c b/fig2dev/dev/genpstricks.c +index cf49207..40ea577 100644 +--- a/fig2dev/dev/genpstricks.c ++++ b/fig2dev/dev/genpstricks.c +@@ -1856,7 +1856,8 @@ format_options(char *options, char *prefix, char *postfix, char *sqrb_init, + else if (fill_style <= 40) + /* shade or tint fill */ + sprintf(tmps, "fillstyle=solid,fillcolor=%s", +- shade_or_tint_name_after_declare_color(tmpc, fill_style, fill_color)); ++ shade_or_tint_name_after_declare_color(tmpc, fill_style, ++ fill_color == DEFAULT ? CT_BLACK : fill_color)); + else { + char *type = 0, *ps; + int angle = 0; +-- +2.31.1 + diff --git a/transfig.spec b/transfig.spec index 933c801..19f94dd 100644 --- a/transfig.spec +++ b/transfig.spec @@ -16,6 +16,7 @@ Patch6: 0006-fig2dev-version-prints-version-information.patch Patch7: 0007-Use-getopt-from-standard-libraries-if-available.patch Patch8: 0008-Replace-most-calls-to-fgets-by-getline-in-read.c.patch Patch9: 0009-CVE-2020-21681.patch +Patch10: 0010-CVE-2020-21683.patch Requires: ghostscript Requires: bc @@ -70,6 +71,7 @@ mv fig2dev.1.in.new man/fig2dev.1.in %changelog * Mon Aug 30 2021 Ondrej Dubaj - 1:3.2.7b-7 - Fixed CVE-2020-21681 (#1998350) +- Fixed CVE-2020-21683 (#1998594) * Tue Aug 10 2021 Mohan Boddu - 1:3.2.7b-6 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags