]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ensure that CUI has a value.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 9 Dec 2025 18:45:28 +0000 (13:45 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 9 Dec 2025 18:51:42 +0000 (13:51 -0500)
src/protocols/radius/decode.c

index ccdebc98bcb33bd4e52fbed7167d6a2999e868e9..4f21c99e0b3af58bc9a4140f0e33ff5c85fd8f66 100644 (file)
@@ -2033,8 +2033,16 @@ ssize_t fr_radius_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out,
                vp = fr_pair_afrom_da(ctx, da);
                if (!vp) return -1;
 
+               /*
+                *      Ensure that it has a value.
+                */
+               if (fr_pair_value_memdup(vp, (uint8_t const *) "", 0, false) < 0) {
+                       talloc_free(vp);
+                       return -1;
+               }
+
+               PAIR_ALLOCED(vp);
                fr_pair_append(out, vp);
-               vp->vp_tainted = true;          /* not REALLY necessary, but what the heck */
 
                return 2;
        }