aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-08 04:25:46 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-08 04:25:46 +0000
commit0a36de0580ac0b686c5f72910bd3f0f0853e54d9 (patch)
tree5ad12e82b21d06ef2f473b69fea582baf18e7523
parent45e92ba2ced91eba4cc432d3addaafdd2a326689 (diff)
downloadbusybox-w32-0a36de0580ac0b686c5f72910bd3f0f0853e54d9.tar.gz
busybox-w32-0a36de0580ac0b686c5f72910bd3f0f0853e54d9.tar.bz2
busybox-w32-0a36de0580ac0b686c5f72910bd3f0f0853e54d9.zip
Fix a stupid segfault caused by dereferencing a NULL ptr.
-Erik
-rw-r--r--hush.c2
-rw-r--r--shell/hush.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/hush.c b/hush.c
index a5f634b9a..1cb5f39ab 100644
--- a/hush.c
+++ b/hush.c
@@ -1162,6 +1162,8 @@ static void checkjobs()
1162 remove_bg_job(pi); 1162 remove_bg_job(pi);
1163 } 1163 }
1164 } else { 1164 } else {
1165 if(pi==NULL)
1166 break;
1165 /* child stopped */ 1167 /* child stopped */
1166 pi->stopped_progs++; 1168 pi->stopped_progs++;
1167 pi->progs[prognum].is_stopped = 1; 1169 pi->progs[prognum].is_stopped = 1;
diff --git a/shell/hush.c b/shell/hush.c
index a5f634b9a..1cb5f39ab 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1162,6 +1162,8 @@ static void checkjobs()
1162 remove_bg_job(pi); 1162 remove_bg_job(pi);
1163 } 1163 }
1164 } else { 1164 } else {
1165 if(pi==NULL)
1166 break;
1165 /* child stopped */ 1167 /* child stopped */
1166 pi->stopped_progs++; 1168 pi->stopped_progs++;
1167 pi->progs[prognum].is_stopped = 1; 1169 pi->progs[prognum].is_stopped = 1;