]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
CID 1508479
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 11 Dec 2022 21:08:13 +0000 (15:08 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 11 Dec 2022 21:08:13 +0000 (15:08 -0600)
src/modules/rlm_detail/rlm_detail.c

index 10c4f24828aa2e2cb79a3c545ac547cb5da05857..c28580bd0bda541ac3b63554bf2378acad862aa9 100644 (file)
@@ -213,11 +213,9 @@ static void detail_fr_pair_fprint(TALLOC_CTX *ctx, FILE *out, fr_pair_t const *s
 {
        fr_pair_t *vp;
 
-       vp = talloc(ctx, fr_pair_t);
-       if (!vp) return;
+       vp = fr_pair_copy(ctx, stacked);
+       if (unlikely(vp == NULL)) return;
 
-       /* coverity[store_writes_const_field] */
-       memcpy(vp, stacked, sizeof(*vp));
        vp->op = T_OP_EQ;
        fr_pair_fprint(out, vp);
        talloc_free(vp);