From: Alan T. DeKok Date: Thu, 26 Oct 2023 12:08:32 +0000 (-0400) Subject: check return code of fr_dict_attr_by_oid_substr() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fdf5640814dbc0dff597972e767798402da912f;p=thirdparty%2Ffreeradius-server.git check return code of fr_dict_attr_by_oid_substr() which can return an error even if the "err" ptr is NULL --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index e760f9a7af0..9f5f18f2807 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -1995,7 +1995,7 @@ fr_dict_attr_t const *fr_dict_attr_by_oid(fr_dict_attr_err_t *err, fr_dict_attr_ fr_sbuff_t sbuff = FR_SBUFF_IN(oid, strlen(oid)); fr_dict_attr_t const *da; - fr_dict_attr_by_oid_substr(err, &da, parent, &sbuff, NULL); + if (fr_dict_attr_by_oid_substr(err, &da, parent, &sbuff, NULL) <= 0) return NULL; if (err && *err != FR_DICT_ATTR_OK) return NULL; /*