From: Alan T. DeKok Date: Sat, 16 Sep 2023 01:25:39 +0000 (-0400) Subject: check return codes to quiet static analyzer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7331f63d9654ef601e24f70261f6e89a36c80b67;p=thirdparty%2Ffreeradius-server.git check return codes to quiet static analyzer --- diff --git a/src/lib/util/value.c b/src/lib/util/value.c index 2384b28ed29..175d1dae639 100644 --- a/src/lib/util/value.c +++ b/src/lib/util/value.c @@ -5631,7 +5631,7 @@ int fr_value_box_list_concat_in_place(TALLOC_CTX *ctx, } (void)fr_sbuff_trim_talloc(&sbuff, SIZE_MAX); if (vb_should_free_value(proc_action)) fr_value_box_clear_value(out); - fr_value_box_bstrndup(out, out, NULL, fr_sbuff_buff(&sbuff), fr_sbuff_used(&sbuff), tainted); + if (fr_value_box_bstrndup(out, out, NULL, fr_sbuff_buff(&sbuff), fr_sbuff_used(&sbuff), tainted) < 0) goto error; break; case FR_TYPE_OCTETS: @@ -5647,7 +5647,7 @@ int fr_value_box_list_concat_in_place(TALLOC_CTX *ctx, } (void)fr_dbuff_trim_talloc(&dbuff, SIZE_MAX); if (vb_should_free_value(proc_action)) fr_value_box_clear_value(out); - fr_value_box_memdup(out, out, NULL, fr_dbuff_buff(&dbuff), fr_dbuff_used(&dbuff), tainted); + if (fr_value_box_memdup(out, out, NULL, fr_dbuff_buff(&dbuff), fr_dbuff_used(&dbuff), tainted) < 0) goto error; break; default: @@ -5671,7 +5671,7 @@ int fr_value_box_list_concat_in_place(TALLOC_CTX *ctx, (void)fr_sbuff_trim_talloc(&sbuff, SIZE_MAX); entry = out->entry; - fr_value_box_bstrndup(out, out, NULL, fr_sbuff_buff(&sbuff), fr_sbuff_used(&sbuff), tainted); + if (fr_value_box_bstrndup(out, out, NULL, fr_sbuff_buff(&sbuff), fr_sbuff_used(&sbuff), tainted) < 0) goto error; out->entry = entry; break; @@ -5682,7 +5682,7 @@ int fr_value_box_list_concat_in_place(TALLOC_CTX *ctx, (void)fr_dbuff_trim_talloc(&dbuff, SIZE_MAX); entry = out->entry; - fr_value_box_memdup(out, out, NULL, fr_dbuff_buff(&dbuff), fr_dbuff_used(&dbuff), tainted); + if (fr_value_box_memdup(out, out, NULL, fr_dbuff_buff(&dbuff), fr_dbuff_used(&dbuff), tainted) < 0) goto error; out->entry = entry; break;