diff options
author | Eric Andersen | 2001-05-08 04:25:46 +0000 |
---|---|---|
committer | Eric Andersen | 2001-05-08 04:25:46 +0000 |
commit | 0a36de0580ac0b686c5f72910bd3f0f0853e54d9 (patch) | |
tree | 5ad12e82b21d06ef2f473b69fea582baf18e7523 | |
parent | 45e92ba2ced91eba4cc432d3addaafdd2a326689 (diff) | |
download | busybox-0a36de0580ac0b686c5f72910bd3f0f0853e54d9.zip busybox-0a36de0580ac0b686c5f72910bd3f0f0853e54d9.tar.gz |
Fix a stupid segfault caused by dereferencing a NULL ptr.
-Erik
-rw-r--r-- | hush.c | 2 | ||||
-rw-r--r-- | shell/hush.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -1162,6 +1162,8 @@ static void checkjobs() remove_bg_job(pi); } } else { + if(pi==NULL) + break; /* child stopped */ pi->stopped_progs++; pi->progs[prognum].is_stopped = 1; diff --git a/shell/hush.c b/shell/hush.c index a5f634b..1cb5f39 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -1162,6 +1162,8 @@ static void checkjobs() remove_bg_job(pi); } } else { + if(pi==NULL) + break; /* child stopped */ pi->stopped_progs++; pi->progs[prognum].is_stopped = 1; |