From: Nick Porter Date: Wed, 25 Jan 2023 19:29:16 +0000 (+0000) Subject: Only check for cast if lhs is a leaf da X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c9225f98db58a8e6c5705a27f66500fa5658623;p=thirdparty%2Ffreeradius-server.git Only check for cast if lhs is a leaf da --- diff --git a/src/lib/server/map.c b/src/lib/server/map.c index e354c340cf6..652b0ca00c6 100644 --- a/src/lib/server/map.c +++ b/src/lib/server/map.c @@ -1611,7 +1611,7 @@ int map_to_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, map_t co * Src/Dst attributes don't match, convert src attributes * to match dst. */ - if (tmpl_is_attr(map->lhs) && + if (tmpl_is_attr(map->lhs) && tmpl_attr_tail_da_is_leaf(map->lhs) && (tmpl_attr_tail_da(map->rhs)->type != tmpl_attr_tail_da(map->lhs)->type)) { for (; vp; vp = fr_dcursor_current(&from)) { MEM(n = fr_pair_afrom_da(ctx, tmpl_attr_tail_da(map->lhs)));