]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ignore fr_sbuff_in_strcpy() return in fr_pair_list_log_sbuff() (CID #1504278) (#4775)
authorJames Jones <jejones3141@gmail.com>
Tue, 18 Oct 2022 17:15:35 +0000 (12:15 -0500)
committerGitHub <noreply@github.com>
Tue, 18 Oct 2022 17:15:35 +0000 (13:15 -0400)
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.

src/lib/util/pair_print.c

index 2150ed11b5fe92fc3249548103bf9040e6177e88..71644c87f45c563ef4e94b5aecf7f8a43e0f9b61 100644 (file)
@@ -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, "",