]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
build issues. Helps with #2127
authorAlan T. DeKok <aland@freeradius.org>
Fri, 17 Nov 2017 21:38:44 +0000 (16:38 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 17 Nov 2017 21:38:44 +0000 (16:38 -0500)
src/modules/rlm_eap/types/rlm_eap_fast/eap_fast.c

index 2c555670302869121ac2b7164fa6efd81310ff58..b1f8dafa213678a89952c1c3eca10b8792b9f310 100644 (file)
@@ -1053,6 +1053,7 @@ static PW_CODE eap_fast_process_tlvs(REQUEST *request, eap_handler_t *eap_sessio
        VALUE_PAIR                      *vp;
        vp_cursor_t                     cursor;
        eap_tlv_crypto_binding_tlv_t    *binding = NULL;
+       eap_tlv_crypto_binding_tlv_t    my_binding;
 
        for (vp = fr_cursor_init(&cursor, &fast_vps); vp; vp = fr_cursor_next(&cursor)) {
                PW_CODE code = PW_CODE_ACCESS_REJECT;
@@ -1081,8 +1082,9 @@ static PW_CODE eap_fast_process_tlvs(REQUEST *request, eap_handler_t *eap_sessio
                                t->stage = PROVISIONING;
                                break;
                        case EAP_FAST_TLV_CRYPTO_BINDING:
-                               if (!binding && (vp->vp_length >= sizeof(eap_tlv_crypto_binding_tlv_t))) { {
-                                       binding = vp->vp_octets;
+                               if (!binding && (vp->vp_length >= sizeof(eap_tlv_crypto_binding_tlv_t))) {
+                                       memcpy(&my_binding, vp->vp_octets, sizeof(my_binding));
+                                       binding = &my_binding;
                                }
                                continue;
                        default: