From: Nick Porter Date: Wed, 25 Jan 2023 19:19:44 +0000 (+0000) Subject: Only leaf vps have the data object X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e80b4f1703055d70125f366f053c7a406002882;p=thirdparty%2Ffreeradius-server.git Only leaf vps have the data object --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 5875601c429..99494c17e5b 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1053,10 +1053,16 @@ void xlat_debug_attr_vp(request_t *request, fr_pair_t *vp, tmpl_t const *vpt) if (vendor) RIDEBUG2("vendor : %i (%s)", vendor->pen, vendor->name); RIDEBUG3("type : %s", fr_type_to_str(vp->vp_type)); - if (fr_box_is_variable_size(&vp->data)) { - RIDEBUG3("length : %zu", vp->vp_length); + switch (vp->da->type) { + case FR_TYPE_LEAF: + if (fr_box_is_variable_size(&vp->data)) { + RIDEBUG3("length : %zu", vp->vp_length); + } + RIDEBUG3("tainted : %pV", fr_box_bool(vp->data.tainted)); + break; + default: + break; } - RIDEBUG3("tainted : %pV", fr_box_bool(vp->data.tainted)); if (!RDEBUG_ENABLED4) { REXDENT();