From 115c8c62e1a218f4b0a5b4e2ad66a29785f29041 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 27 Sep 2022 16:47:45 -0400 Subject: [PATCH] import bash-4.4.20-4.el8_6 --- .../bash-4.4-fix-buffered_getchar-crash.patch | 23 +++++++++++++++++++ SPECS/bash.spec | 9 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 SOURCES/bash-4.4-fix-buffered_getchar-crash.patch diff --git a/SOURCES/bash-4.4-fix-buffered_getchar-crash.patch b/SOURCES/bash-4.4-fix-buffered_getchar-crash.patch new file mode 100644 index 0000000..0290fa8 --- /dev/null +++ b/SOURCES/bash-4.4-fix-buffered_getchar-crash.patch @@ -0,0 +1,23 @@ +diff -up bash-4.4/input.c.orig bash-4.4/input.c +--- bash-4.4/input.c.orig 2022-03-10 10:50:40.046490589 -0300 ++++ bash-4.4/input.c 2022-03-10 10:51:48.659491601 -0300 +@@ -530,7 +530,7 @@ bufstream_ungetc(c, bp) + int c; + BUFFERED_STREAM *bp; + { +- if (c == EOF || bp->b_inputp == 0) ++ if (c == EOF || bp == 0 || bp->b_inputp == 0) + return (EOF); + + bp->b_buffer[--bp->b_inputp] = c; +@@ -561,6 +561,10 @@ buffered_getchar () + { + CHECK_TERMSIG; + ++ if (bash_input.location.buffered_fd < 0 || ++ buffers[bash_input.location.buffered_fd] == 0) ++ return EOF; ++ + #if !defined (DJGPP) + return (bufstream_getc (buffers[bash_input.location.buffered_fd])); + #else diff --git a/SPECS/bash.spec b/SPECS/bash.spec index 07a1702..b2e431b 100644 --- a/SPECS/bash.spec +++ b/SPECS/bash.spec @@ -7,7 +7,7 @@ Version: %{baseversion}%{patchleveltag} Name: bash Summary: The GNU Bourne Again shell -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ Url: https://www.gnu.org/software/bash Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz @@ -115,6 +115,9 @@ Patch137: bash-5.0-bgp-resize.patch # 1794884 - HISTTIMEFORMAT causes Segmentation fault under certain conditions Patch138: bash-5.0-histtimeformat-segfault.patch +#2062291 - Segfault in 'buffered_getchar()' function in bash +Patch139: bash-4.4-fix-buffered_getchar-crash.patch + BuildRequires: texinfo bison BuildRequires: ncurses-devel BuildRequires: autoconf, gettext @@ -338,6 +341,10 @@ end %{_libdir}/pkgconfig/%{name}.pc %changelog +* Tue Apr 05 2022 Siteshwar Vashisht - 4.4.20-4 +- Fix a crash in buffered_getchar() function + Resolves: #2062291 + * Thu Sep 30 2021 Siteshwar Vashisht - 4.4.20-3 - Bump version number Resolves: #2004189