From: Alan T. DeKok Date: Wed, 2 Oct 2019 02:12:59 +0000 (-0400) Subject: !whitespace is also "not zero and not whitespace" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=258daaae49df7520fc4a08f57789ed48c9995778;p=thirdparty%2Ffreeradius-server.git !whitespace is also "not zero and not whitespace" When parsing zero-terminated strings, stop at zero. --- diff --git a/src/lib/util/misc.h b/src/lib/util/misc.h index dbe7cc7a5af..985fb8ee223 100644 --- a/src/lib/util/misc.h +++ b/src/lib/util/misc.h @@ -72,7 +72,7 @@ void fr_talloc_verify_cb(const void *ptr, int depth, * * @param[in,out] _p string to skip over. */ -#define fr_skip_not_whitespace(_p) while(!isspace((int)*(_p))) _p++ +#define fr_skip_not_whitespace(_p) while(*_p && !isspace((int)*(_p))) _p++ /** Zero out any whitespace with nul bytes *