Fix crash with
OBS-URL: https://build.opensuse.org/package/show/shells/zsh?expand=0&rev=44
This commit is contained in:
parent
f4b6325fa3
commit
b2c9668071
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:956100a251cf523978a2f81802636b6cdd28f2861d508eedb10477317cecec4c
|
||||
size 2687527
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30eb774120d89d98336c929c210a9df4f61fc1f0137732812a6c0d8b8d074f05
|
||||
size 2868429
|
36
subst-crash.patch
Normal file
36
subst-crash.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From aa58d139ff3ffa7258a6273bf279d70f9ee31916 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Stephenson <pws@users.sourceforge.net>
|
||||
Date: Tue, 18 Jan 2011 10:29:58 +0000
|
||||
Subject: [PATCH] Mikael: 28637: ${foo:0:} caused crash
|
||||
|
||||
---
|
||||
ChangeLog | 6 +++++-
|
||||
Src/subst.c | 14 ++++++++------
|
||||
Test/D04parameter.ztst | 5 +++++
|
||||
3 files changed, 18 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/Src/subst.c b/Src/subst.c
|
||||
index 24d515d..37d63ca 100644
|
||||
--- a/Src/subst.c
|
||||
+++ b/Src/subst.c
|
||||
@@ -2814,12 +2814,14 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int ssub)
|
||||
zerr("invalid length: %s", check_offset);
|
||||
return NULL;
|
||||
}
|
||||
- length = mathevali(check_offset);
|
||||
- if (errflag)
|
||||
- return NULL;
|
||||
- if (length < (zlong)0) {
|
||||
- zerr("invalid length: %s", check_offset);
|
||||
- return NULL;
|
||||
+ if (check_offset) {
|
||||
+ length = mathevali(check_offset);
|
||||
+ if (errflag)
|
||||
+ return NULL;
|
||||
+ if (length < (zlong)0) {
|
||||
+ zerr("invalid length: %s", check_offset);
|
||||
+ return NULL;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
if (horrible_offset_hack) {
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 15 13:40:24 UTC 2011 - ismail@namtrac.org
|
||||
|
||||
- Fix crash with ${foo:0:}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 29 02:07:58 UTC 2010 - cristian.rodriguez@opensuse.org
|
||||
|
||||
|
2
zsh.spec
2
zsh.spec
@ -46,6 +46,7 @@ Patch0: %{name}-%{version}-doc_makefile.patch
|
||||
Patch1: %{name}-%{version}-doc_intro_paths.patch
|
||||
Patch2: %{name}-%{version}-run-help_pager.patch
|
||||
Patch3: zsh-cleanup.patch
|
||||
Patch4: subst-crash.patch
|
||||
Summary: Shell with comprehensive completion
|
||||
%define do_profiling 0
|
||||
|
||||
@ -67,6 +68,7 @@ Authors:
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4 -p1
|
||||
# Fix bindir path in some files
|
||||
perl -p -i -e 's|/usr/local/bin|%{_bindir}|' \
|
||||
Functions/Misc/zcalc Functions/Example/cat \
|
||||
|
Loading…
Reference in New Issue
Block a user