Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Lukáš Zaoral
7805fd749f
Fix zlogout when ncurses is not installed
Resolves: rhbz#2279741
2024-05-13 12:23:52 +02:00
Lukáš Zaoral
553eea06c4
fix segfault in delerefilelist
Resolves: rhbz#2245462
2024-01-17 14:16:15 +01:00
3 changed files with 52 additions and 2 deletions

View file

@ -0,0 +1,42 @@
From d3edf318306e37d2d96c4e4ea442d10207722e94 Mon Sep 17 00:00:00 2001
From: Bart Schaefer <schaefer@zsh.org>
Date: Sun, 12 Feb 2023 09:52:39 -0800
Subject: [PATCH] 51404: Nullify filelist after deleting (fix segfault)
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
Upstream-commit: d3edf318306e37d2d96c4e4ea442d10207722e94
---
Src/jobs.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Src/jobs.c b/Src/jobs.c
index 4863962b9..59ddd952e 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1372,8 +1372,10 @@ cleanfilelists(void)
DPUTS(shell_exiting >= 0, "BUG: cleanfilelists() before exit");
- for (i = 1; i <= maxjob; i++)
+ for (i = 1; i <= maxjob; i++) {
deletefilelist(jobtab[i].filelist, 0);
+ jobtab[i].filelist = 0;
+ }
}
/**/
@@ -1531,8 +1533,10 @@ havefiles(void)
int i;
for (i = 1; i <= maxjob; i++)
- if (jobtab[i].stat && jobtab[i].filelist)
+ if (jobtab[i].stat && jobtab[i].filelist &&
+ peekfirst(jobtab[i].filelist)) {
return 1;
+ }
return 0;
}
--
2.43.0

View file

@ -4,4 +4,4 @@
#
#
clear
command -v clear &> /dev/null && clear

View file

@ -1,7 +1,7 @@
Summary: Powerful interactive shell
Name: zsh
Version: 5.9
Release: 8%{?dist}
Release: 10%{?dist}
License: MIT-Modern-Variant AND ISC AND GPL-2.0-only
URL: http://zsh.sourceforge.net/
Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz
@ -19,6 +19,8 @@ Patch1: 0001-zsh-5.9-do-not-use-egrep-in-tests.patch
Patch2: 0002-zsh-Use-int-main-in-test-c-codes.patch
# upstream commit a84fdd7c8f77935ecce99ff2b0bdba738821ed79
Patch3: 0003-zsh-fix-module-loading-problem-with-full-RELRO.patch
# upstream commit d3edf318306e37d2d96c4e4ea442d10207722e94
Patch4: 0004-zsh-deletefilelist-segfault.patch
BuildRequires: autoconf
BuildRequires: coreutils
@ -164,6 +166,12 @@ fi
%doc Doc/*.html
%changelog
* Mon May 13 2024 Lukáš Zaoral <lzaoral@redhat.com> - 5.9-10
- fix zlogout when ncurses is not installed (rhbz#2279741)
* Wed Jan 17 2024 Lukáš Zaoral <lzaoral@redhat.com> - 5.9-9
- fix segfault in delerefilelist (rhbz#2245462)
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild