]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
list may be empty
authorAlan T. DeKok <aland@freeradius.org>
Tue, 30 Aug 2022 19:42:47 +0000 (15:42 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 30 Aug 2022 19:42:47 +0000 (15:42 -0400)
src/lib/server/tmpl_eval.c

index 2edb65cd25aa12a7d9c001219d993ff4b0423770..43d72e45c6c5228a408df0ea7f97889d97a580c1 100644 (file)
@@ -1562,6 +1562,7 @@ int tmpl_eval_cast(TALLOC_CTX *ctx, fr_value_box_list_t *list, tmpl_t const *vpt
         *      Apply a cast to the results if required.
         */
        vb = fr_dlist_head(list);
+       if (!vb) return 0;
 
        switch (cast) {
        default: