Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package zsh for openSUSE:Factory checked in 
at 2022-03-28 17:00:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zsh (Old)
 and      /work/SRC/openSUSE:Factory/.zsh.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zsh"

Mon Mar 28 17:00:11 2022 rev:96 rq:964828 version:5.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/zsh/zsh.changes  2020-12-02 13:57:47.505773976 
+0100
+++ /work/SRC/openSUSE:Factory/.zsh.new.1900/zsh.changes        2022-03-28 
17:00:53.796996716 +0200
@@ -1,0 +2,21 @@
+Sun Mar 20 20:03:32 UTC 2022 - Dirk M??ller <[email protected]>
+
+- update to 5.8.1 (bsc#1196435, CVE-2021-45444):
+  * CVE-2021-45444: Some prompt expansion sequences, such as %F, support
+    'arguments' which are themselves expanded in case they contain colour
+    values, etc. This additional expansion would trigger PROMPT_SUBST
+    evaluation, if enabled. This could be abused to execute code the user
+    didn't expect. e.g., given a certain prompt configuration, an attacker
+    could trick a user into executing arbitrary code by having them check
+    out a Git branch with a specially crafted name.
+
+    This is fixed in the shell itself by no longer performing PROMPT_SUBST
+    evaluation on these prompt-expansion arguments.
+
+    Users who are concerned about an exploit but unable to update their
+    binaries may apply the partial work-around described in the file
+    Etc/CVE-2021-45444-VCS_Info-workaround.patch included with the shell
+    source. [ Reported by RyotaK <[email protected]>. Additional thanks to
+    Marc Cornell?? <[email protected]>. ] 
+
+-------------------------------------------------------------------

Old:
----
  zsh-5.8.tar.xz
  zsh-5.8.tar.xz.asc

New:
----
  zsh-5.8.1.tar.xz
  zsh-5.8.1.tar.xz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zsh.spec ++++++
--- /var/tmp/diff_new_pack.uMJwM9/_old  2022-03-28 17:00:54.436997585 +0200
+++ /var/tmp/diff_new_pack.uMJwM9/_new  2022-03-28 17:00:54.444997596 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package zsh
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
 BuildRequires:  texinfo
 %endif
 Name:           zsh
-Version:        5.8
+Version:        5.8.1
 Release:        0%{?dist}
 Summary:        Shell with comprehensive completion
 License:        MIT

++++++ zsh-5.8.tar.xz -> zsh-5.8.1.tar.xz ++++++
++++ 17755 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/ChangeLog new/zsh-5.8.1/ChangeLog
--- old/zsh-5.8/ChangeLog       2020-02-14 23:11:10.000000000 +0100
+++ new/zsh-5.8.1/ChangeLog     2022-02-12 14:35:02.000000000 +0100
@@ -1,3 +1,42 @@
+2022-02-12  dana  <[email protected]>
+
+       * unposted: Config/version.mk, Etc/FAQ.yo, README: Update
+       for 5.8.1
+
+2022-01-27  dana  <[email protected]>
+
+       * Jun-ichi Takimoto: unposted: Src/input.c: add 'static' to
+       shinsavestack
+
+       * Peter Stephenson: 49290: Src/init.c, Src/input.c: Replace
+       stdio for buffered shell input to avoid memory management
+       interacting with signal handlers.
+
+       * Jun-ichi Takimoto: 49377: Src/Zle/zle_keymap.c,
+       Test/X03zlebindkey.ztst: fix segfault by 'bindkey -d' with
+       reordered keymapnamtab
+
+       * Jun-ichi Takimoto: 47560: configure.ac, aczsh.m4: add necessary
+       includes or prototypes for the tests in configure (fix errors in
+       macOS 11)
+
+       * unposted: Completion/Unix/Command/_git: Fix copy/paste error
+       in earlier commit that broke `git stash drop`
+
+       * Marc Cornell??: security/82 (tweaked):
+       Functions/VCS_Info/VCS_INFO_formats: Fix typo in
+       hook_com[base-name_orig] assignment
+
+       * CVE-2021-45444: NEWS, README: Document preceding two changes
+
+       * Marc Cornell??: security/89:
+       Etc/CVE-2021-45444-VCS_Info-workaround.patch: Add patch which
+       can optionally be used to work around recursive PROMPT_SUBST
+       issue in VCS_Info
+
+       * Oliver Kiddle: security/41: Src/prompt.c: Prevent recursive
+       PROMPT_SUBST
+
 2020-02-14  dana  <[email protected]>
 
        * unposted: Config/version.mk: Update for 5.8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Completion/Unix/Command/_git 
new/zsh-5.8.1/Completion/Unix/Command/_git
--- old/zsh-5.8/Completion/Unix/Command/_git    2020-02-03 06:49:31.000000000 
+0100
+++ new/zsh-5.8.1/Completion/Unix/Command/_git  2022-02-12 14:22:15.000000000 
+0100
@@ -1809,7 +1809,7 @@
           _nothing
           ;;
         (drop)
-          _arguments -S $endopt \_git-notes
+          _arguments -S $endopt \
             '(-q --quiet)'{-q,--quiet}'[suppress all output]' \
             ':: :__git_stashes' && ret=0
           ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Config/version.mk new/zsh-5.8.1/Config/version.mk
--- old/zsh-5.8/Config/version.mk       2020-02-14 23:11:10.000000000 +0100
+++ new/zsh-5.8.1/Config/version.mk     2022-02-12 14:35:02.000000000 +0100
@@ -27,5 +27,5 @@
 # This must also serve as a shell script, so do not add spaces around the
 # `=' signs.
 
-VERSION=5.8
-VERSION_DATE='February 14, 2020'
+VERSION=5.8.1
+VERSION_DATE='February 12, 2022'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/version.yo new/zsh-5.8.1/Doc/version.yo
--- old/zsh-5.8/Doc/version.yo  2020-02-14 23:13:00.000000000 +0100
+++ new/zsh-5.8.1/Doc/version.yo        2022-02-12 15:53:59.000000000 +0100
@@ -1,6 +1,6 @@
 IFDEF(INCWSLEVEL)(INCWSLEVEL())(STARTDEF())
-def(version)(0)(5.8)
-def(date)(0)(February 14, 2020)
+def(version)(0)(5.8.1)
+def(date)(0)(February 12, 2022)
 def(zshenv)(0)(/etc/zshenv)
 def(zprofile)(0)(/etc/zprofile)
 def(zshrc)(0)(/etc/zshrc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zsh.1 new/zsh-5.8.1/Doc/zsh.1
--- old/zsh-5.8/Doc/zsh.1       2020-02-14 23:13:01.000000000 +0100
+++ new/zsh-5.8.1/Doc/zsh.1     2022-02-12 15:53:59.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSH" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSH" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zsh \- the Z shell
 .\" Yodl file: Zsh/intro.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zsh.texi new/zsh-5.8.1/Doc/zsh.texi
--- old/zsh-5.8/Doc/zsh.texi    2020-02-14 23:13:08.000000000 +0100
+++ new/zsh-5.8.1/Doc/zsh.texi  2022-02-12 15:54:06.000000000 +0100
@@ -27,8 +27,8 @@
 @end iftex
 @titlepage
 @title The Z Shell Manual
-@subtitle Version 5.8
-@subtitle Updated February 14, 2020
+@subtitle Version 5.8.1
+@subtitle Updated February 12, 2022
 @author Original documentation by Paul Falstad
 @page
 This is a texinfo version of the documentation for the Z Shell, originally by 
@@ -63,7 +63,7 @@
 
 @noindent
 @cindex version
-Version 5.8, last updated February 14, 2020.
+Version 5.8.1, last updated February 12, 2022.
 @end ifinfo
 
 @menu
@@ -34876,7 +34876,7 @@
 @noindent
 @example
 mkdir ~/zsh_help
-perl ~/zsh-5.8/Util/helpfiles ~/zsh_help
+perl ~/zsh-5.8.1/Util/helpfiles ~/zsh_help
 @end example
 
 @noindent
@@ -35037,7 +35037,7 @@
 
 @noindent
 @example
-zsh -f ~/zsh-5.8/Functions/Misc/zkbd
+zsh -f ~/zsh-5.8.1/Functions/Misc/zkbd
 @end example
 
 @noindent
@@ -35102,7 +35102,7 @@
 
 @noindent
 @example
-. ~/zsh-5.8/Util/reporter > zsh.report
+. ~/zsh-5.8.1/Util/reporter > zsh.report
 @end example
 
 @noindent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshall.1 new/zsh-5.8.1/Doc/zshall.1
--- old/zsh-5.8/Doc/zshall.1    2020-02-14 23:13:05.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshall.1  2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHALL" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHALL" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshall \- the Z shell meta\-man page
 .\" Yodl file: Zsh/intro.yo
@@ -476,7 +476,7 @@
 .so man1/zshtcpsys.1
 .so man1/zshzftpsys.1
 .so man1/zshcontrib.1
-.TH "ZSHALL" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHALL" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .\" Yodl file: Zsh/filelist.yo
 .SH "FILES"
 .PD 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshbuiltins.1 new/zsh-5.8.1/Doc/zshbuiltins.1
--- old/zsh-5.8/Doc/zshbuiltins.1       2020-02-14 23:13:01.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshbuiltins.1     2022-02-12 15:54:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHBUILTINS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHBUILTINS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshbuiltins \- zsh built\-in commands
 .\" Yodl file: Zsh/builtins.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshcalsys.1 new/zsh-5.8.1/Doc/zshcalsys.1
--- old/zsh-5.8/Doc/zshcalsys.1 2020-02-14 23:13:01.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshcalsys.1       2022-02-12 15:54:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHCALSYS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHCALSYS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshcalsys \- zsh calendar system
 .\" Yodl file: Zsh/calsys.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshcompctl.1 new/zsh-5.8.1/Doc/zshcompctl.1
--- old/zsh-5.8/Doc/zshcompctl.1        2020-02-14 23:13:01.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshcompctl.1      2022-02-12 15:54:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPCTL" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHCOMPCTL" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshcompctl \- zsh programmable completion
 .\" Yodl file: Zsh/compctl.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshcompsys.1 new/zsh-5.8.1/Doc/zshcompsys.1
--- old/zsh-5.8/Doc/zshcompsys.1        2020-02-14 23:13:02.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshcompsys.1      2022-02-12 15:54:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPSYS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHCOMPSYS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshcompsys \- zsh completion system
 .\" Yodl file: Zsh/compsys.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshcompwid.1 new/zsh-5.8.1/Doc/zshcompwid.1
--- old/zsh-5.8/Doc/zshcompwid.1        2020-02-14 23:13:01.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshcompwid.1      2022-02-12 15:54:00.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHCOMPWID" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHCOMPWID" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshcompwid \- zsh completion widgets
 .\" Yodl file: Zsh/compwid.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshcontrib.1 new/zsh-5.8.1/Doc/zshcontrib.1
--- old/zsh-5.8/Doc/zshcontrib.1        2020-02-14 23:13:02.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshcontrib.1      2022-02-12 15:54:01.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHCONTRIB" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHCONTRIB" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshcontrib \- user contributions to zsh
 .\" Yodl file: Zsh/contrib.yo
@@ -41,7 +41,7 @@
 .RS
 .nf
 \fBmkdir ~/zsh_help
-perl ~/zsh\-5\&.8/Util/helpfiles ~/zsh_help\fP
+perl ~/zsh\-5\&.8\&.1/Util/helpfiles ~/zsh_help\fP
 .fi
 .RE
 .PP
@@ -181,7 +181,7 @@
 .PP
 .RS
 .nf
-\fBzsh \-f ~/zsh\-5\&.8/Functions/Misc/zkbd\fP
+\fBzsh \-f ~/zsh\-5\&.8\&.1/Functions/Misc/zkbd\fP
 .fi
 .RE
 .PP
@@ -237,7 +237,7 @@
 .PP
 .RS
 .nf
-\fB\&. ~/zsh\-5\&.8/Util/reporter > zsh\&.report\fP
+\fB\&. ~/zsh\-5\&.8\&.1/Util/reporter > zsh\&.report\fP
 .fi
 .RE
 .PP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshexpn.1 new/zsh-5.8.1/Doc/zshexpn.1
--- old/zsh-5.8/Doc/zshexpn.1   2020-02-14 23:13:03.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshexpn.1 2022-02-12 15:54:01.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHEXPN" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHEXPN" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshexpn \- zsh expansion and substitution
 .\" Yodl file: Zsh/expn.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshmisc.1 new/zsh-5.8.1/Doc/zshmisc.1
--- old/zsh-5.8/Doc/zshmisc.1   2020-02-14 23:13:03.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshmisc.1 2022-02-12 15:54:01.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHMISC" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHMISC" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshmisc \- everything and then some
 .\" Yodl file: Zsh/grammar.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshmodules.1 new/zsh-5.8.1/Doc/zshmodules.1
--- old/zsh-5.8/Doc/zshmodules.1        2020-02-14 23:13:03.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshmodules.1      2022-02-12 15:54:02.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHMODULES" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHMODULES" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshmodules \- zsh loadable modules
 .\" Yodl file: Zsh/modules.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshoptions.1 new/zsh-5.8.1/Doc/zshoptions.1
--- old/zsh-5.8/Doc/zshoptions.1        2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshoptions.1      2022-02-12 15:54:02.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHOPTIONS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHOPTIONS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshoptions \- zsh options
 .\" Yodl file: Zsh/options.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshparam.1 new/zsh-5.8.1/Doc/zshparam.1
--- old/zsh-5.8/Doc/zshparam.1  2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshparam.1        2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHPARAM" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHPARAM" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshparam \- zsh parameters
 .\" Yodl file: Zsh/params.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshroadmap.1 new/zsh-5.8.1/Doc/zshroadmap.1
--- old/zsh-5.8/Doc/zshroadmap.1        2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshroadmap.1      2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHROADMAP" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHROADMAP" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshroadmap \- informal introduction to the zsh manual
 .\" Yodl file: Zsh/roadmap.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshtcpsys.1 new/zsh-5.8.1/Doc/zshtcpsys.1
--- old/zsh-5.8/Doc/zshtcpsys.1 2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshtcpsys.1       2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHTCPSYS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHTCPSYS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshtcpsys \- zsh tcp system
 .\" Yodl file: Zsh/tcpsys.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshzftpsys.1 new/zsh-5.8.1/Doc/zshzftpsys.1
--- old/zsh-5.8/Doc/zshzftpsys.1        2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshzftpsys.1      2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHZFTPSYS" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHZFTPSYS" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshzftpsys \- zftp function front\-end
 .\" Yodl file: Zsh/zftpsys.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Doc/zshzle.1 new/zsh-5.8.1/Doc/zshzle.1
--- old/zsh-5.8/Doc/zshzle.1    2020-02-14 23:13:04.000000000 +0100
+++ new/zsh-5.8.1/Doc/zshzle.1  2022-02-12 15:54:03.000000000 +0100
@@ -1,4 +1,4 @@
-.TH "ZSHZLE" "1" "February 14, 2020" "zsh 5\&.8"
+.TH "ZSHZLE" "1" "February 12, 2022" "zsh 5\&.8\&.1"
 .SH "NAME"
 zshzle \- zsh command line editor
 .\" Yodl file: Zsh/zle.yo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Etc/CVE-2021-45444-VCS_Info-workaround.patch 
new/zsh-5.8.1/Etc/CVE-2021-45444-VCS_Info-workaround.patch
--- old/zsh-5.8/Etc/CVE-2021-45444-VCS_Info-workaround.patch    1970-01-01 
01:00:00.000000000 +0100
+++ new/zsh-5.8.1/Etc/CVE-2021-45444-VCS_Info-workaround.patch  2022-02-12 
14:15:27.000000000 +0100
@@ -0,0 +1,98 @@
+From 972887bbe5eb6a00e5f0e73781d6d73bfdcafb93 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <[email protected]>
+Date: Mon, 24 Jan 2022 09:43:28 +0100
+Subject: [PATCH] security/89: Partially work around CVE-2021-45444 in VCS_Info
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch is a partial, VCS_Info-specific work-around for CVE-2021-45444,
+which is mitigated in the shell itself in 5.8.1 and later versions. It is
+offered for users who are concerned about an exploit but are unable to update
+their binaries to receive the complete fix.
+
+The patch works around the vulnerability by pre-escaping values substituted
+into format strings in VCS_Info. Please note that this may break some user
+configurations that rely on those values being un-escaped (which is why it was
+not included directly in 5.8.1). It may be possible to limit this breakage by
+adjusting exactly which ones are pre-escaped, but of course this may leave
+them vulnerable again.
+
+If applying the patch to the file system is inconvenient or not possible, the
+following script can be used to idempotently patch the relevant function
+running in memory (and thus must be re-run when the shell is restarted):
+
+
+# Impacted versions go from v5.0.3 to v5.8 (v5.8.1 is the first patched 
version)
+autoload -Uz is-at-least
+if is-at-least 5.8.1 || ! is-at-least 5.0.3; then
+  return
+fi
+
+# Quote necessary $hook_com[<field>] items just before they are used
+# in the line "VCS_INFO_hook 'post-backend'" of the VCS_INFO_formats
+# function, where <field> is:
+#
+#   base:       the full path of the repository's root directory.
+#   base-name:  the name of the repository's root directory.
+#   branch:     the name of the currently checked out branch.
+#   revision:   an identifier of the currently checked out revision.
+#   subdir:     the path of the current directory relative to the
+#               repository's root directory.
+#   misc:       a string that may contain anything the vcs_info backend wants.
+#
+# This patch %-quotes these fields previous to their use in vcs_info hooks and
+# the zformat call and, eventually, when they get expanded in the prompt.
+# It's important to quote these here, and not later after hooks have modified 
the
+# fields, because then we could be quoting % characters from valid prompt 
sequences,
+# like %F{color}, %B, etc.
+#
+#  32   ??? hook_com[subdir]="$(VCS_INFO_reposub ${hook_com[base]})"
+#  33   ??? hook_com[subdir_orig]="${hook_com[subdir]}"
+#  34   ???
+#  35 + ??? for tmp in base base-name branch misc revision subdir; do
+#  36 + ???     hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"
+#  37 + ??? done
+#  38 + ???
+#  39   ??? VCS_INFO_hook 'post-backend'
+#
+# This is especially important so that no command substitution is performed
+# due to malicious input as a consequence of CVE-2021-45444, which affects
+# zsh versions from 5.0.3 to 5.8.
+#
+autoload -Uz +X regexp-replace VCS_INFO_formats
+
+# We use $tmp here because it's already a local variable in VCS_INFO_formats
+typeset PATCH='for tmp (base base-name branch misc revision subdir) 
hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"'
+# Unique string to avoid reapplying the patch if this code gets called twice
+typeset PATCH_ID=vcs_info-patch-9b9840f2-91e5-4471-af84-9e9a0dc68c1b
+# Only patch the VCS_INFO_formats function if not already patched
+if [[ "$functions[VCS_INFO_formats]" != *$PATCH_ID* ]]; then
+  regexp-replace 'functions[VCS_INFO_formats]' \
+    "VCS_INFO_hook 'post-backend'" \
+    ': ${PATCH_ID}; ${PATCH}; ${MATCH}'
+fi
+unset PATCH PATCH_ID
+
+
+---
+ Functions/VCS_Info/VCS_INFO_formats | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Functions/VCS_Info/VCS_INFO_formats 
b/Functions/VCS_Info/VCS_INFO_formats
+index e0e1dc738..4d88e28b6 100644
+--- a/Functions/VCS_Info/VCS_INFO_formats
++++ b/Functions/VCS_Info/VCS_INFO_formats
+@@ -32,6 +32,10 @@ hook_com[base-name_orig]="${hook_com[base_name]}"
+ hook_com[subdir]="$(VCS_INFO_reposub ${hook_com[base]})"
+ hook_com[subdir_orig]="${hook_com[subdir]}"
+ 
++for tmp in base base-name branch misc revision subdir; do
++    hook_com[$tmp]="${hook_com[$tmp]//\%/%%}"
++done
++
+ VCS_INFO_hook 'post-backend'
+ 
+ ## description (for backend authors):
+-- 
+2.34.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Etc/FAQ new/zsh-5.8.1/Etc/FAQ
--- old/zsh-5.8/Etc/FAQ 2020-02-06 21:06:15.000000000 +0100
+++ new/zsh-5.8.1/Etc/FAQ       2022-02-12 15:53:50.000000000 +0100
@@ -252,7 +252,7 @@
 1.5: What's the latest version?
 
 
-Zsh 5.8 is the latest production version.  For details of all the
+Zsh 5.8.1 is the latest production version.  For details of all the
   changes, see the NEWS file in the source distribution.
 
 A beta of the next version is sometimes available.  Development of zsh is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Etc/FAQ.yo new/zsh-5.8.1/Etc/FAQ.yo
--- old/zsh-5.8/Etc/FAQ.yo      2020-01-11 20:42:14.000000000 +0100
+++ new/zsh-5.8.1/Etc/FAQ.yo    2022-02-12 14:35:02.000000000 +0100
@@ -308,7 +308,7 @@
 
 sect(What's the latest version?)
 
-  Zsh 5.8 is the latest production version.  For details of all the
+  Zsh 5.8.1 is the latest production version.  For details of all the
   changes, see the NEWS file in the source distribution.
 
   A beta of the next version is sometimes available.  Development of zsh is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Functions/VCS_Info/VCS_INFO_formats 
new/zsh-5.8.1/Functions/VCS_Info/VCS_INFO_formats
--- old/zsh-5.8/Functions/VCS_Info/VCS_INFO_formats     2018-06-24 
02:14:58.000000000 +0200
+++ new/zsh-5.8.1/Functions/VCS_Info/VCS_INFO_formats   2022-02-12 
14:22:14.000000000 +0100
@@ -28,7 +28,7 @@
     vcs_orig      "${vcs}"
 )
 hook_com[base-name]="${${hook_com[base]}:t}"
-hook_com[base-name_orig]="${hook_com[base_name]}"
+hook_com[base-name_orig]="${hook_com[base-name]}"
 hook_com[subdir]="$(VCS_INFO_reposub ${hook_com[base]})"
 hook_com[subdir_orig]="${hook_com[subdir]}"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/NEWS new/zsh-5.8.1/NEWS
--- old/zsh-5.8/NEWS    2020-02-14 23:06:58.000000000 +0100
+++ new/zsh-5.8.1/NEWS  2022-02-12 14:21:54.000000000 +0100
@@ -4,6 +4,26 @@
 
 Note also the list of incompatibilities in the README file.
 
+Changes since 5.8
+-----------------
+
+CVE-2021-45444: Some prompt expansion sequences, such as %F, support
+'arguments' which are themselves expanded in case they contain colour
+values, etc. This additional expansion would trigger PROMPT_SUBST
+evaluation, if enabled. This could be abused to execute code the user
+didn't expect. e.g., given a certain prompt configuration, an attacker
+could trick a user into executing arbitrary code by having them check
+out a Git branch with a specially crafted name.
+
+This is fixed in the shell itself by no longer performing PROMPT_SUBST
+evaluation on these prompt-expansion arguments.
+
+Users who are concerned about an exploit but unable to update their
+binaries may apply the partial work-around described in the file
+Etc/CVE-2021-45444-VCS_Info-workaround.patch included with the shell
+source. [ Reported by RyotaK <[email protected]>. Additional thanks to
+Marc Cornell?? <[email protected]>. ]
+
 Changes since 5.7.1-test-3
 --------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/README new/zsh-5.8.1/README
--- old/zsh-5.8/README  2020-02-14 23:06:58.000000000 +0100
+++ new/zsh-5.8.1/README        2022-02-12 14:35:02.000000000 +0100
@@ -5,12 +5,11 @@
 Version
 -------
 
-This is version 5.8 of the shell.  This is a security and feature release.
-There are a few visible improvements since 5.7, as well as many bugfixes.
+This is version 5.8.1 of the shell.  This is a security and bugfix release.
 All zsh installations are encouraged to upgrade as soon as possible.
 
 Note in particular the changes highlighted under "Incompatibilities since
-5.7.1" below.  See NEWS for more information.
+5.8" below.  See NEWS for more information.
 
 Installing Zsh
 --------------
@@ -31,6 +30,12 @@
 file FEATURES, and for the latest changes see NEWS.  For more
 details, see the documentation.
 
+Incompatibilities since 5.8
+---------------------------
+
+PROMPT_SUBST expansion is no longer performed on arguments to prompt-
+expansion sequences such as %F.
+
 Incompatibilities since 5.7.1
 -----------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Src/Zle/zle_keymap.c new/zsh-5.8.1/Src/Zle/zle_keymap.c
--- old/zsh-5.8/Src/Zle/zle_keymap.c    2020-01-11 20:42:14.000000000 +0100
+++ new/zsh-5.8.1/Src/Zle/zle_keymap.c  2022-02-12 14:22:15.000000000 +0100
@@ -155,7 +155,7 @@
     keymapnamtab = newhashtable(7, "keymapnamtab", NULL);
 
     keymapnamtab->hash        = hasher;
-    keymapnamtab->emptytable  = emptyhashtable;
+    keymapnamtab->emptytable  = emptykeymapnamtab;
     keymapnamtab->filltable   = NULL;
     keymapnamtab->cmpnodes    = strcmp;
     keymapnamtab->addnode     = addhashnode;
@@ -178,6 +178,26 @@
     return kmn;
 }
 
+/**/
+static void
+emptykeymapnamtab(HashTable ht)
+{
+    struct hashnode *hn, *hp;
+    int i;
+
+    for (i = 0; i < ht->hsize; i++) {
+       for (hn = ht->nodes[i]; hn;) {
+           KeymapName kmn = (KeymapName) hn;
+           hp = hn->next;
+           zsfree(kmn->nam);
+           unrefkeymap(kmn->keymap);
+           zfree(kmn, sizeof(*kmn));
+           hn = hp;
+       }
+       ht->nodes[i] = NULL;
+    }
+    ht->ct = 0;
+}
 
 /*
  * Reference a keymap from a keymapname.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Src/init.c new/zsh-5.8.1/Src/init.c
--- old/zsh-5.8/Src/init.c      2020-02-03 06:49:31.000000000 +0100
+++ new/zsh-5.8.1/Src/init.c    2022-02-12 14:22:15.000000000 +0100
@@ -1222,7 +1222,7 @@
     /*
      * Finish setting up SHIN and its relatives.
      */
-    bshin = SHIN ? fdopen(SHIN, "r") : stdin;
+    shinbufalloc();
     if (isset(SHINSTDIN) && !SHIN && unset(INTERACTIVE)) {
 #ifdef _IONBF
        setvbuf(stdin, NULL, _IONBF, 0);
@@ -1377,9 +1377,9 @@
        dosetopt(RESTRICTED, 1, 0, opts);
     if (cmd) {
        if (SHIN >= 10)
-           fclose(bshin);
+           close(SHIN);
        SHIN = movefd(open("/dev/null", O_RDONLY | O_NOCTTY));
-       bshin = fdopen(SHIN, "r");
+       shinbufreset();
        execstring(cmd, 0, 1, "cmdarg");
        stopmsg = 1;
        zexit((exit_pending || shell_exiting) ? exit_val : lastval, 
ZEXIT_NORMAL);
@@ -1402,7 +1402,6 @@
     int tempfd = -1, fd, cj;
     zlong oldlineno;
     int oldshst, osubsh, oloops;
-    FILE *obshin;
     char *old_scriptname = scriptname, *us;
     char *old_scriptfilename = scriptfilename;
     unsigned char *ocs;
@@ -1419,7 +1418,6 @@
 
     /* save the current shell state */
     fd        = SHIN;            /* store the shell input fd                  
*/
-    obshin    = bshin;          /* store file handle for buffered shell input 
*/
     osubsh    = subsh;           /* store whether we are in a subshell        
*/
     cj        = thisjob;         /* store our current job number              
*/
     oldlineno = lineno;          /* store our current lineno                  
*/
@@ -1432,7 +1430,7 @@
 
     if (!prog) {
        SHIN = tempfd;
-       bshin = fdopen(SHIN, "r");
+       shinbufsave();
     }
     subsh  = 0;
     lineno = 1;
@@ -1500,10 +1498,10 @@
     if (prog)
        freeeprog(prog);
     else {
-       fclose(bshin);
+       close(SHIN);
        fdtable[SHIN] = FDT_UNUSED;
        SHIN = fd;                   /* the shell input fd                   */
-       bshin = obshin;              /* file handle for buffered shell input */
+       shinbufrestore();
     }
     subsh = osubsh;                  /* whether we are in a subshell         */
     thisjob = cj;                    /* current job number                   */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Src/input.c new/zsh-5.8.1/Src/input.c
--- old/zsh-5.8/Src/input.c     2018-12-16 02:39:51.000000000 +0100
+++ new/zsh-5.8.1/Src/input.c   2022-02-12 14:22:15.000000000 +0100
@@ -80,11 +80,6 @@
 /**/
 int SHIN;
 
-/* buffered shell input for non-interactive shells */
-
-/**/
-FILE *bshin;
-
 /* != 0 means we are reading input from a string */
  
 /**/
@@ -129,7 +124,116 @@
 
 static int instacksz = INSTACK_INITIAL;
 
-/* Read a line from bshin.  Convert tokens and   *
+/* Size of buffer for non-interactive command input */
+
+#define SHINBUFSIZE 8192
+
+/* Input buffer for non-interactive command input */
+static char *shinbuffer;
+
+/* Pointer into shinbuffer */
+static char *shinbufptr;
+
+/* End of contents read into shinbuffer */
+static char *shinbufendptr;
+
+/* Entry on SHIN buffer save stack */
+struct shinsaveentry {
+    /* Next entry on stack */
+    struct shinsaveentry *next;
+    /* Saved shinbuffer */
+    char *buffer;
+    /* Saved shinbufptr */
+    char *ptr;
+    /* Saved shinbufendptr */
+    char *endptr;
+};
+
+/* SHIN buffer save stack */
+static struct shinsaveentry *shinsavestack;
+
+/* Reset the input buffer for SHIN, discarding any pending input */
+
+/**/
+void
+shinbufreset(void)
+{
+    shinbufendptr = shinbufptr = shinbuffer;
+}
+
+/* Allocate a new shinbuffer
+ *
+ * Only called at shell initialisation and when saving on the stack.
+ */
+
+/**/
+void
+shinbufalloc(void)
+{
+    shinbuffer = zalloc(SHINBUFSIZE);
+    shinbufreset();
+}
+
+/* Save entry on SHIN buffer save stack */
+
+/**/
+void
+shinbufsave(void)
+{
+    struct shinsaveentry *entry =
+       (struct shinsaveentry *)zalloc(sizeof(struct shinsaveentry));
+
+    entry->next = shinsavestack;
+    entry->buffer = shinbuffer;
+    entry->ptr = shinbufptr;
+    entry->endptr = shinbufendptr;
+
+    shinsavestack = entry;
+
+    shinbufalloc();
+}
+
+/* Restore entry from SHIN buffer save stack */
+
+/**/
+void
+shinbufrestore(void)
+{
+    struct shinsaveentry *entry = shinsavestack;
+
+    zfree(shinbuffer, SHINBUFSIZE);
+
+    shinbuffer = entry->buffer;
+    shinbufptr = entry->ptr;
+    shinbufendptr = entry->endptr;
+
+    shinsavestack = entry->next;
+    zfree(entry, sizeof(struct shinsaveentry));
+}
+
+/* Get a character from SHIN, -1 if none available */
+
+/**/
+static int
+shingetchar(void)
+{
+    int nread;
+
+    if (shinbufptr < shinbufendptr)
+       return STOUC(*shinbufptr++);
+
+    shinbufreset();
+    do {
+       errno = 0;
+       nread = read(SHIN, shinbuffer, SHINBUFSIZE);
+    } while (nread < 0 && errno == EINTR);
+    if (nread <= 0)
+       return -1;
+    shinbufendptr = shinbuffer + nread;
+    return STOUC(*shinbufptr++);
+}
+
+/* Read a line from SHIN.  Convert tokens and   *
  * null characters to Meta c^32 character pairs. */
 
 /**/
@@ -147,11 +251,7 @@
     winch_unblock();
     dont_queue_signals();
     for (;;) {
-       /* Can't fgets() here because we need to accept '\0' bytes */
-       do {
-           errno = 0;
-           c = fgetc(bshin);
-       } while (c < 0 && errno == EINTR);
+       c = shingetchar();
        if (c < 0 || c == '\n') {
            winch_block();
            restore_queue_signals(q);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Src/patchlevel.h.release new/zsh-5.8.1/Src/patchlevel.h.release
--- old/zsh-5.8/Src/patchlevel.h.release        2020-02-14 23:16:14.000000000 
+0100
+++ new/zsh-5.8.1/Src/patchlevel.h.release      2022-02-12 15:59:32.000000000 
+0100
@@ -1 +1 @@
-#define ZSH_PATCHLEVEL "zsh-5.8-0-g77d203f"
+#define ZSH_PATCHLEVEL "zsh-5.8.1-0-g1a490c7"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Src/prompt.c new/zsh-5.8.1/Src/prompt.c
--- old/zsh-5.8/Src/prompt.c    2019-12-30 11:20:53.000000000 +0100
+++ new/zsh-5.8.1/Src/prompt.c  2022-02-12 13:44:25.000000000 +0100
@@ -244,6 +244,12 @@
        bv->fm += 2; /* skip over F{ */
        if ((ep = strchr(bv->fm, '}'))) {
            char oc = *ep, *col, *coll;
+           int ops = opts[PROMPTSUBST], opb = opts[PROMPTBANG];
+           int opp = opts[PROMPTPERCENT];
+
+           opts[PROMPTPERCENT] = 1;
+           opts[PROMPTSUBST] = opts[PROMPTBANG] = 0;
+
            *ep = '\0';
            /* expand the contents of the argument so you can use
             * %v for example */
@@ -252,6 +258,10 @@
            arg = match_colour((const char **)&coll, is_fg, 0);
            free(col);
            bv->fm = ep;
+
+           opts[PROMPTSUBST] = ops;
+           opts[PROMPTBANG] = opb;
+           opts[PROMPTPERCENT] = opp;
        } else {
            arg = match_colour((const char **)&bv->fm, is_fg, 0);
            if (*bv->fm != '}')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/Test/X03zlebindkey.ztst new/zsh-5.8.1/Test/X03zlebindkey.ztst
--- old/zsh-5.8/Test/X03zlebindkey.ztst 2018-06-24 02:14:58.000000000 +0200
+++ new/zsh-5.8.1/Test/X03zlebindkey.ztst       2022-02-12 14:22:15.000000000 
+0100
@@ -143,3 +143,18 @@
 >CURSOR: 18
 >BUFFER: echo $(( ##x ) ##x ) y
 >CURSOR: 22
+
+  bindkey -d
+  for name in a b c d e; bindkey -N $name
+  bindkey -d
+  bindkey -l
+0:delete all keymaps after expanding keymapnamtab
+>.safe
+>command
+>emacs
+>isearch
+>main
+>vicmd
+>viins
+>viopp
+>visual
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/aczsh.m4 new/zsh-5.8.1/aczsh.m4
--- old/zsh-5.8/aczsh.m4        2017-12-04 15:09:36.000000000 +0100
+++ new/zsh-5.8.1/aczsh.m4      2022-02-12 14:22:15.000000000 +0100
@@ -118,6 +118,7 @@
 AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
 AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o 
$LIBS 1>&AC_FD_CC); then
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
@@ -199,6 +200,7 @@
 AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
 AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o 
$LIBS 1>&AC_FD_CC); then
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
@@ -274,6 +276,7 @@
 AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest2.c 1>&AC_FD_CC) &&
 AC_TRY_COMMAND($DLLD -o conftest2.$DL_EXT $LDFLAGS $DLLDFLAGS conftest2.o 
$LIBS 1>&AC_FD_CC); then
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
@@ -343,6 +346,7 @@
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
@@ -416,6 +420,7 @@
     save_ldflags=$LDFLAGS
     LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS -s"
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
@@ -483,6 +488,7 @@
 if AC_TRY_COMMAND($CC -c $CFLAGS $CPPFLAGS $DLCFLAGS conftest1.c 1>&AC_FD_CC) 
&&
 AC_TRY_COMMAND($DLLD -o conftest1.$DL_EXT $LDFLAGS $DLLDFLAGS -s conftest1.o 
$LIBS 1>&AC_FD_CC); then
     AC_TRY_RUN([
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/config.h.in new/zsh-5.8.1/config.h.in
--- old/zsh-5.8/config.h.in     2020-02-14 18:38:46.000000000 +0100
+++ new/zsh-5.8.1/config.h.in   2022-02-12 15:53:04.000000000 +0100
@@ -57,15 +57,10 @@
 /* Undefine if you don't want local features. By default this is defined. */
 #undef CONFIG_LOCALE
 
-/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
-   systems. This function is required for `alloca.c' support on those systems.
-   */
-#undef CRAY_STACKSEG_END
-
 /* Define to a custom value for the ZSH_PATCHLEVEL parameter */
 #undef CUSTOM_PATCHLEVEL
 
-/* Define to 1 if using `alloca.c'. */
+/* Define to 1 if using 'alloca.c'. */
 #undef C_ALLOCA
 
 /* Define to 1 if you want to debug zsh. */
@@ -128,11 +123,10 @@
 /* Define if TIOCGWINSZ is defined in sys/ioctl.h but not in termios.h. */
 #undef GWINSZ_IN_SYS_IOCTL
 
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define to 1 if you have 'alloca', as a function or macro. */
 #undef HAVE_ALLOCA
 
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
-   */
+/* Define to 1 if <alloca.h> works. */
 #undef HAVE_ALLOCA_H
 
 /* Define to 1 if you have the <bind/netdb.h> header file. */
@@ -1135,7 +1129,9 @@
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
 #undef STAT_MACROS_BROKEN
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
 /* Define to 1 if you use SYS style signal handling (and can block signals).
@@ -1154,7 +1150,8 @@
 /* Define if sys/time.h and sys/select.h cannot be both included. */
 #undef TIME_H_SELECT_H_CONFLICTS
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
+   macro is obsolete. */
 #undef TIME_WITH_SYS_TIME
 
 /* Define to 1 if all the kit for using /dev/ptmx for ptys is available. */
@@ -1224,11 +1221,6 @@
 /* Define to the base type of the third argument of accept */
 #undef ZSOCKLEN_T
 
-/* Enable large inode numbers on Mac OS X 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
@@ -1250,7 +1242,7 @@
 /* Define to `long int' if <sys/types.h> does not define. */
 #undef off_t
 
-/* Define to `int' if <sys/types.h> does not define. */
+/* Define as a signed integer type capable of holding a process identifier. */
 #undef pid_t
 
 /* Define to the type used in struct rlimit. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/zsh-5.8/configure.ac new/zsh-5.8.1/configure.ac
--- old/zsh-5.8/configure.ac    2020-02-14 23:06:57.000000000 +0100
+++ new/zsh-5.8.1/configure.ac  2022-02-12 15:52:59.000000000 +0100
@@ -1394,6 +1394,10 @@
 AC_CACHE_CHECK(if tgetent accepts NULL,
 zsh_cv_func_tgetent_accepts_null,
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <fcntl.h>
+#include <stdlib.h>
+int tgetent(char *, char *);
+char *tgetstr(char *, char **);
 main()
 {
     char buf[4096];
@@ -1418,6 +1422,10 @@
 AC_CACHE_CHECK(if tgetent returns 0 on success,
 zsh_cv_func_tgetent_zero_success,
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <fcntl.h>
+#include <stdlib.h>
+int tgetent(char *, char*);
+char *tgetstr(char *, char **);
 main()
 {
     char buf[4096];
@@ -1855,6 +1863,7 @@
 #include <sys/time.h>
 #endif
 #include <sys/resource.h>
+#include <stdlib.h>
 main(){struct rlimit r;exit(sizeof(r.rlim_cur) <= 
sizeof(long));}]])],[zsh_cv_rlim_t_is_longer=yes],[zsh_cv_rlim_t_is_longer=no],[zsh_cv_rlim_t_is_longer=yes])])
 if test x$zsh_cv_rlim_t_is_longer = xyes; then
   AC_CACHE_CHECK(if rlim_t is a quad,
@@ -1865,6 +1874,7 @@
 #endif
 #include <stdio.h>
 #include <sys/resource.h>
+#include <stdlib.h>
 main() { 
   struct rlimit r;
   char buf[20];
@@ -1887,6 +1897,7 @@
 #include <sys/time.h>
 #endif
 #include <sys/resource.h>
+#include <stdlib.h>
   main(){struct rlimit 
r;r.rlim_cur=-1;exit(r.rlim_cur<0);}]])],[zsh_cv_type_rlim_t_is_unsigned=yes],[zsh_cv_type_rlim_t_is_unsigned=no],[zsh_cv_type_rlim_t_is_unsigned=no])])
   if test x$zsh_cv_type_rlim_t_is_unsigned = xyes; then
     AC_DEFINE(RLIM_T_IS_UNSIGNED)
@@ -2258,6 +2269,9 @@
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <fcntl.h>
 #include <signal.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/stat.h>
 main()
 {
     char c;
@@ -2299,6 +2313,7 @@
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 main()
 {
     int ret;
@@ -2331,6 +2346,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
+#include <stdlib.h>
 main()
 {
     int pid = (getpid() + 10000) & 0xffffff;
@@ -2356,6 +2372,7 @@
     [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <signal.h>
 #include <unistd.h>
+#include <stdlib.h>
 int child=0;
 void handler(sig)
     int sig;
@@ -2407,6 +2424,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 main() {
     int fd;
     int ret;
@@ -2450,6 +2468,10 @@
     zsh_cv_sys_getpwnam_faked,
     [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <pwd.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
 main() {
     struct passwd *pw1, *pw2;
     char buf[1024], name[1024];
@@ -2777,6 +2799,7 @@
    [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Test for whether ELF binaries are 
produced */
 #include <fcntl.h>
 #include <stdlib.h>
+#include <unistd.h>
 main(argc, argv)
 int argc;
 char *argv[];
@@ -2930,6 +2953,7 @@
     AC_TRY_COMMAND($DLLD $LDFLAGS $DLLDFLAGS -o conftest.$DL_EXT conftest.o 
1>&AS_MESSAGE_LOG_FD) &&
     AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include <stdio.h>
+#include <stdlib.h>
 #ifdef HPUX10DYNAMIC
 #include <dl.h>
 #define RTLD_LAZY BIND_DEFERRED

Reply via email to