From: Alan T. DeKok Date: Fri, 26 Feb 2021 17:37:11 +0000 (-0500) Subject: don't decode anything for CUI X-Git-Tag: release_3_0_22~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bf02178d34c41711b84ef8e3605988ba7151ba0;p=thirdparty%2Ffreeradius-server.git don't decode anything for CUI --- diff --git a/src/lib/radius.c b/src/lib/radius.c index affb4bfecd..06376d45cb 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -3803,19 +3803,12 @@ ssize_t data2vp(TALLOC_CTX *ctx, return 0; } -#if !defined(NDEBUG) || defined(__clang_analyzer__) /* - * Hacks for Coverity. Editing the dictionary - * will break assumptions about CUI. We know - * this, but Coverity doesn't. + * Create a zero-length attribute. */ - if (da->type != PW_TYPE_OCTETS) return -1; -#endif - - data = buffer; - *buffer = '\0'; - datalen = 0; - goto alloc_cui; /* skip everything */ + vp = fr_pair_afrom_da(ctx, da); + if (!vp) return -1; + goto done; } /* @@ -4271,6 +4264,8 @@ ssize_t data2vp(TALLOC_CTX *ctx, fr_strerror_printf("Internal sanity check %d", __LINE__); return -1; } + +done: vp->type = VT_DATA; *pvp = vp;