]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't convert RHS to data if RHS is empty
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Jul 2015 17:57:15 +0000 (13:57 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 9 Jul 2015 17:57:15 +0000 (13:57 -0400)
FIXME: The test should really be converted to an existence check

src/main/modcall.c

index 6947f43aff44d14e88ef4c307e4f6fc2229e4eab..de625c98ee6399f7d1e578a043968787170d4b0a 100644 (file)
@@ -3220,7 +3220,7 @@ static bool pass2_callback(void *ctx, fr_cond_t *c)
                 *
                 *      @todo v3.1: allow anything anywhere.
                 */
-               if (map->rhs->type != TMPL_TYPE_LITERAL) {
+               if ((map->rhs->type != TMPL_TYPE_LITERAL) || !map->rhs->len) {
                        if (!pass2_xlat_compile(map->ci, &map->lhs, false, NULL)) {
                                return false;
                        }