]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix direct manipulation of boxes in compose.c
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 8 Oct 2021 16:14:59 +0000 (11:14 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 8 Oct 2021 16:21:56 +0000 (11:21 -0500)
src/lib/eap/compose.c

index c476a3bc7474135371d3108792cd2ed7a81f26d8..b00c1a0c905d7676850a78452f4fee45c4aed20c 100644 (file)
@@ -228,8 +228,8 @@ rlm_rcode_t eap_compose(eap_session_t *eap_session)
        eap_packet = (eap_packet_raw_t *)reply->packet;
 
        MEM(pair_append_reply(&vp, attr_eap_message) >= 0);
-       vp->vp_length = eap_packet->length[0] * 256 + eap_packet->length[1];
-       vp->vp_octets = talloc_steal(vp, reply->packet);
+       fr_pair_value_memdup_shallow(vp, talloc_steal(vp, reply->packet),
+                                    eap_packet->length[0] * 256 + eap_packet->length[1], false);
        reply->packet = NULL;
 
        /*