From: DongHun Kwak Date: Thu, 22 Dec 2022 07:22:35 +0000 (+0900) Subject: feat: Add pipeline null check logic X-Git-Tag: submit/tizen_7.0_base/20221222.072802^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e01393bb0ca67df0141650b58d5b4aab52dddbd0;p=product%2Fupstream%2Fbash.git feat: Add pipeline null check logic Change-Id: I2fd33d92ef112290448d08aabd0ed7ec29ab9fbf --- diff --git a/packaging/add_pipeline_null_check.patch b/packaging/add_pipeline_null_check.patch new file mode 100644 index 0000000..398d728 --- /dev/null +++ b/packaging/add_pipeline_null_check.patch @@ -0,0 +1,13 @@ +diff --git a/jobs.c b/jobs.c +index d183394..b6f951f 100644 +--- a/jobs.c ++++ b/jobs.c +@@ -1275,6 +1275,8 @@ find_pipeline (pid, alive_only, jobp) + p = the_pipeline; + do + { ++ if ( p == 0x00 ) break; ++ + /* Return it if we found it. Don't ever return a recycled pid. */ + if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p))) + return (p); diff --git a/packaging/bash.spec b/packaging/bash.spec index 60863b5..e823f04 100644 --- a/packaging/bash.spec +++ b/packaging/bash.spec @@ -13,6 +13,7 @@ Url: http://www.gnu.org/software/bash Group: Base/Utilities Source0: %{name}-%{version}.tar.gz Source1001: bash.manifest +Source1002: add_pipeline_null_check.patch BuildRequires: autoconf BuildRequires: bison BuildRequires: fdupes @@ -29,6 +30,7 @@ incorporates useful features from the Korn shell (ksh) and the C shell %prep %setup -q cp %{SOURCE1001} . +%{__patch} -p1 < %{SOURCE1002} %build export CFLAGS+=" -fPIC -fvisibility=hidden -flto "