From 1b568474830308923229d752f2a2c43bb7ac3bbc Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Tue, 20 Jun 2023 13:26:14 +0200 Subject: [PATCH] import sources --- EMPTY | 1 - liblouis-2.6.2-CVE-2018-11683.patch | 38 +++++++++++++++++++++++++++++ liblouis.spec | 8 +++--- 3 files changed, 42 insertions(+), 5 deletions(-) delete mode 100644 EMPTY create mode 100644 liblouis-2.6.2-CVE-2018-11683.patch diff --git a/EMPTY b/EMPTY deleted file mode 100644 index 0519ecb..0000000 --- a/EMPTY +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/liblouis-2.6.2-CVE-2018-11683.patch b/liblouis-2.6.2-CVE-2018-11683.patch new file mode 100644 index 0000000..a341512 --- /dev/null +++ b/liblouis-2.6.2-CVE-2018-11683.patch @@ -0,0 +1,38 @@ +diff -urN liblouis-2.6.2.old/tools/lou_translate.c liblouis-2.6.2/tools/lou_translate.c +--- liblouis-2.6.2.old/tools/lou_translate.c 2020-05-17 07:37:40.572000000 +0100 ++++ liblouis-2.6.2/tools/lou_translate.c 2020-05-17 07:43:28.596000000 +0100 +@@ -36,8 +36,6 @@ + #include "progname.h" + #include "version-etc.h" + +-#define BUFSIZE MAXSTRING - 4 +- + static int forward_flag = 0; + static int backward_flag = 0; + +@@ -58,10 +56,10 @@ + static void + translate_input (int forward_translation, char *table_name) + { +- char charbuf[BUFSIZE]; ++ char charbuf[MAXSTRING]; + char *outputbuf; +- widechar inbuf[BUFSIZE]; +- widechar transbuf[BUFSIZE]; ++ widechar inbuf[MAXSTRING]; ++ widechar transbuf[MAXSTRING]; + int inlen; + int translen; + int k; +@@ -69,9 +67,9 @@ + int result; + while (1) + { +- translen = BUFSIZE; ++ translen = MAXSTRING; + k = 0; +- while ((ch = getchar ()) != '\n' && ch != EOF && k < BUFSIZE-1) ++ while ((ch = getchar ()) != '\n' && ch != EOF && k < MAXSTRING-1) + charbuf[k++] = ch; + if (ch == EOF && k == 0) + break; diff --git a/liblouis.spec b/liblouis.spec index 71658ba..aad1793 100644 --- a/liblouis.spec +++ b/liblouis.spec @@ -12,7 +12,7 @@ Name: liblouis Version: 2.6.2 -Release: 22%{?dist}.0.1 +Release: 22%{?dist} Summary: Braille translation and back-translation library Group: System Environment/Libraries @@ -35,6 +35,8 @@ Patch4: liblouis-2.6.2-CVE-2018-11685.patch Patch5: liblouis-2.6.2-CVE-2018-12085.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1602585 Patch6: liblouis-2.6.2-coverity-fixes.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1588626 +Patch7: liblouis-2.6.2-CVE-2018-11683.patch BuildRequires: chrpath BuildRequires: help2man @@ -139,6 +141,7 @@ This package provides the documentation for liblouis. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # For patch0 autoreconf -fi @@ -233,9 +236,6 @@ fi %changelog -* Thu Jun 03 2021 Carl George - 2.6.2-22.0.1 -- Manually revert 2.6.2-22 with positive release bump rhbz#1962411 - * Sat May 16 2020 David King - 2.6.2-22 - Fix CVE-2018-11683 (#1588626)