From: James Jones Date: Tue, 18 Oct 2022 17:15:35 +0000 (-0500) Subject: Ignore fr_sbuff_in_strcpy() return in fr_pair_list_log_sbuff() (CID #1504278) (#4775) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa2a3a9ccf34b096e6e628e474bf7846d32b285d;p=thirdparty%2Ffreeradius-server.git Ignore fr_sbuff_in_strcpy() return in fr_pair_list_log_sbuff() (CID #1504278) (#4775) sbuff is emptied each time through the for loop, and down this path it will only contain the output of fr_dict_attr_oid_print(), possibly preceded by "raw.". fr_pair_list_log_sbuff() is only called from one place, which passes in an sbuff using an array of 1024 characters. This should suffice to make appending " = " always work. --- diff --git a/src/lib/util/pair_print.c b/src/lib/util/pair_print.c index 2150ed11b5f..71644c87f45 100644 --- a/src/lib/util/pair_print.c +++ b/src/lib/util/pair_print.c @@ -167,7 +167,7 @@ static void fr_pair_list_log_sbuff(fr_log_t const *log, int lvl, fr_pair_t *pare break; default: - fr_sbuff_in_strcpy(sbuff, " = "); + (void) fr_sbuff_in_strcpy(sbuff, " = "); fr_value_box_print_quoted(sbuff, &vp->data, T_DOUBLE_QUOTED_STRING); fr_log(log, L_DBG, file, line, "%*s%*s", lvl * 2, "",