From: Alan T. DeKok Date: Thu, 19 Oct 2017 19:26:57 +0000 (-0400) Subject: check before dreference. CID #1414436 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=962c4993a7815f562e2be25ff5a7ed96fda9dfed;p=thirdparty%2Ffreeradius-server.git check before dreference. CID #1414436 --- diff --git a/src/main/cf_util.c b/src/main/cf_util.c index 6e823eefe0e..c0f1adc38fc 100644 --- a/src/main/cf_util.c +++ b/src/main/cf_util.c @@ -1564,8 +1564,8 @@ static inline void truncate_filename(char const **e, char const **p, int *len, c *len = FILENAME_TRUNCATE; q = strchr(*p, FR_DIR_SEP); - q++; if (q) { + q++; *p += (q - *p); *len -= (q - *p); }