]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check for empty string && output list
authorAlan T. DeKok <aland@freeradius.org>
Mon, 23 Mar 2020 14:22:58 +0000 (10:22 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 23 Mar 2020 14:22:58 +0000 (10:22 -0400)
src/lib/server/xlat_tokenize.c

index 03c344a5f20e9a10464f4c2185e008df9db9bc23..96ebf9ba013fc1f9824bb6f323fc84a69d650bbd 100644 (file)
@@ -938,6 +938,11 @@ ssize_t xlat_tokenize_argv(TALLOC_CTX *ctx, xlat_exp_t **head, char const *in, s
                last = &(node->next);
        }
 
+       if (!my_head) {
+               fr_strerror_printf("Empty string is invalid");
+               return -1;
+       }
+
        *head = my_head;
        my_head->count = count;
        return p - in;