From bb709b6447604b87c21ad0c406f24247be619889 Mon Sep 17 00:00:00 2001 From: vcrhonek Date: Fri, 29 Feb 2008 12:32:23 +0000 Subject: [PATCH] Fix '\' can not be used to quote all delimiters, Fix name[selector] should fail when any number of 'selector' is out of range --- tcsh-6.15.00-hist-sub.patch | 13 +++++++++++++ tcsh-6.15.00-var-sub.patch | 13 +++++++++++++ tcsh.spec | 12 +++++++++++- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tcsh-6.15.00-hist-sub.patch create mode 100644 tcsh-6.15.00-var-sub.patch diff --git a/tcsh-6.15.00-hist-sub.patch b/tcsh-6.15.00-hist-sub.patch new file mode 100644 index 0000000..f16be67 --- /dev/null +++ b/tcsh-6.15.00-hist-sub.patch @@ -0,0 +1,13 @@ +diff --git a/tcsh.man b/tcsh.man +index 0c9c3b6..3e389f4 100644 +--- a/tcsh.man ++++ b/tcsh.man +@@ -1035,7 +1035,7 @@ Substitute \fIl\fR for \fIr\fR. + \fIl\fR is simply a string like \fIr\fR, not a regular expression as in + the eponymous \fIed\fR(1) command. + Any character may be used as the delimiter in place of `/'; +-a `\\' can be used to quote the delimiter inside \fIl\fR and \fIr\fR. ++a `\\' can be used to quote the delimiter expect `(', `)', `|' and `>' inside \fIl\fR and \fIr\fR. + The character `&' in the \fIr\fR is replaced by \fIl\fR; `\\' also quotes `&'. + If \fIl\fR is empty (``''), the \fIl\fR from a previous substitution or the + \fIs\fR from a previous search or event number in event specification is used. diff --git a/tcsh-6.15.00-var-sub.patch b/tcsh-6.15.00-var-sub.patch new file mode 100644 index 0000000..05b96d8 --- /dev/null +++ b/tcsh-6.15.00-var-sub.patch @@ -0,0 +1,13 @@ +diff --git a/sh.dol.c b/sh.dol.c +index 73ac3b2..0e7c87d 100755 +--- a/sh.dol.c ++++ b/sh.dol.c +@@ -613,7 +613,7 @@ Dgetdol(void) + + for (i = 0; Isdigit(*np); i = i * 10 + *np++ - '0') + continue; +- if ((i < 0 || i > upb) && !any("-*", *np)) { ++ if (i < 0 || i > upb) { + cleanup_until(&name); + dolerror(vp->v_name); + return; diff --git a/tcsh.spec b/tcsh.spec index 9ddf465..0c4dd6b 100644 --- a/tcsh.spec +++ b/tcsh.spec @@ -3,13 +3,15 @@ Summary: An enhanced version of csh, the C shell Name: tcsh Version: 6.15 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD with advertising Group: System Environment/Shells Source: ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.00.tar.gz Patch1: tcsh-6.15.00-closem.patch Patch2: tcsh-6.14.00-tinfo.patch Patch3: tcsh-6.14.00-unprintable.patch +Patch4: tcsh-6.15.00-hist-sub.patch +Patch5: tcsh-6.15.00-var-sub.patch Provides: csh = %{version} Requires(post): grep Requires(postun): coreutils, grep @@ -30,6 +32,8 @@ like syntax. %patch1 -p1 -b .closem %patch2 -p1 -b .tinfo %patch3 -p1 -b .unprintable +%patch4 -p1 -b .hist-sub +%patch5 -p1 -b .var-sub %build # For tcsh-6.14.00-tinfo.patch @@ -97,6 +101,12 @@ fi %{_mandir}/*/* %changelog +* Fri Feb 29 2008 Vitezslav Crhonek - 6.15-4 +- Fix '\' can not be used to quote all delimiters + Related: #435421 +- Fix $name[selector] should fail when any number of 'selector' is out of range + Related: #435398 + * Mon Feb 11 2008 Vitezslav Crhonek - 6.15-3 - Fix Buildroot