-/* $OpenBSD: cond.c,v 1.52 2017/06/21 00:11:36 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.53 2017/12/19 20:44:53 zhuk Exp $ */
/* $NetBSD: cond.c,v 1.7 1996/11/06 17:59:02 christos Exp $ */
/*
char *lhs;
end = condExpr;
- while (!ISSPACE(*end) && strchr("!=><", *end) == NULL)
+ while (*end != '\0' && !ISSPACE(*end) && strchr("!=><", *end) == NULL)
end++;
lhs = Str_dupi(condExpr, end);
condExpr = end;
return Err;
condExpr += varSpecLen;
- if (!ISSPACE(*condExpr) &&
+ if (*condExpr && !ISSPACE(*condExpr) &&
strchr("!=><", *condExpr) == NULL) {
BUFFER buf;
-/* $OpenBSD: parse.c,v 1.119 2017/12/05 14:35:12 espie Exp $ */
+/* $OpenBSD: parse.c,v 1.120 2017/12/19 20:44:53 zhuk Exp $ */
/* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */
/*
if (*p == '\0')
break;
p++;
- } while (!ISSPACE(*p));
+ } while (*p != '\0' && !ISSPACE(*p));
/* No better match later on... */
if (*p == '\0')