summaryrefslogtreecommitdiffstats
path: root/driver/subprocs.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/subprocs.c')
-rw-r--r--driver/subprocs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/subprocs.c b/driver/subprocs.c
index d500f70..e251842 100644
--- a/driver/subprocs.c
+++ b/driver/subprocs.c
@@ -264,8 +264,8 @@ make_job (pid_t pid, int screen, const char *cmd)
clean_job_list();
AGAIN:
- while (isspace(*in)) in++; /* skip whitespace */
- while (!isspace(*in) && *in != ':') {
+ while (*in && isspace(*in)) in++; /* skip whitespace */
+ while (*in && !isspace(*in) && *in != ':') {
if (*in == '=') got_eq = 1;
*out++ = *in++; /* snarf first token */
}
@@ -277,7 +277,7 @@ make_job (pid_t pid, int screen, const char *cmd)
goto AGAIN;
}
- while (isspace(*in)) in++; /* skip whitespace */
+ while (*in && isspace(*in)) in++; /* skip whitespace */
*out = 0;
job->name = strdup(name);