From 2954208d00d422b34fa3a69631b0a091f17a349d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 2 Dec 2020 08:23:52 +0100 Subject: 5.44 --- driver/subprocs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'driver/subprocs.c') 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); -- cgit v1.2.3-55-g7522