From 128a6d19a03ddf0aabbc3d96afda23e378e9b4f0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 07 2022 22:15:53 +0000 Subject: import bash-4.4.20-4.el8 --- 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