From: Arran Cudbard-Bell Date: Sun, 11 Dec 2022 21:08:13 +0000 (-0600) Subject: CID 1508479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed03e66d4dbc42ec9c9cc9d91776b25ea6c61262;p=thirdparty%2Ffreeradius-server.git CID 1508479 --- diff --git a/src/modules/rlm_detail/rlm_detail.c b/src/modules/rlm_detail/rlm_detail.c index 10c4f24828a..c28580bd0bd 100644 --- a/src/modules/rlm_detail/rlm_detail.c +++ b/src/modules/rlm_detail/rlm_detail.c @@ -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);