]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check return codes to quiet static analyzer
authorAlan T. DeKok <aland@freeradius.org>
Sat, 16 Sep 2023 01:25:39 +0000 (21:25 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 16 Sep 2023 01:25:39 +0000 (21:25 -0400)
src/lib/util/value.c

index 2384b28ed29c4e0b2de096d4a5f9b5242b391697..175d1dae63909a775a4084b9dc67d731f3c8c768 100644 (file)
@@ -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;