From: Alan T. DeKok Date: Tue, 9 Dec 2025 18:45:28 +0000 (-0500) Subject: ensure that CUI has a value. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf014439e9d1f6ec4d9734d1a25811bc7113fbdc;p=thirdparty%2Ffreeradius-server.git ensure that CUI has a value. --- diff --git a/src/protocols/radius/decode.c b/src/protocols/radius/decode.c index ccdebc98bcb..4f21c99e0b3 100644 --- a/src/protocols/radius/decode.c +++ b/src/protocols/radius/decode.c @@ -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; }