Projects
openEuler:24.03
zsh
_service:tar_scm:0008-zsh-deletefilelist-segfau...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0008-zsh-deletefilelist-segfault.patch of Package zsh
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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2