]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't access data union if it's a structural attribute
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 21 Jul 2021 19:52:12 +0000 (14:52 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 21 Jul 2021 19:52:12 +0000 (14:52 -0500)
src/lib/util/pair.c

index 0b492af12763f920e604bf7bf42c20aad4fae895..13782f0206dd17d944a1e8155de48a0b25f6b2d1 100644 (file)
@@ -2386,7 +2386,7 @@ void fr_pair_verify(char const *file, int line, fr_pair_t const *vp)
                                             fr_table_str_by_value(fr_value_box_type_table, FR_TYPE_OCTETS, "<INVALID>"),
                                             fr_table_str_by_value(fr_value_box_type_table, vp->data.type, "<INVALID>"));
                }
-       } else if (vp->da->type != vp->data.type) {
+       } else if (!fr_type_is_structural(vp->da->type) && (vp->da->type != vp->data.type)) {
                char data_type_int[10], da_type_int[10];
 
                snprintf(data_type_int, sizeof(data_type_int), "%i", vp->data.type);