From: Kevin Wasserman Date: Sat, 28 Jun 2014 09:22:25 +0000 (-0400) Subject: Fix cursor initialization bugs in eap_chbind_vp2packet X-Git-Tag: v3.0.10-moonshot~78 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=4fd27ea2f91cdb1e5c44c76d8a3b5d3783b33227 Fix cursor initialization bugs in eap_chbind_vp2packet --- diff --git a/src/modules/rlm_eap/libeap/eap_chbind.c b/src/modules/rlm_eap/libeap/eap_chbind.c index 2304554..a99ebf5 100644 --- a/src/modules/rlm_eap/libeap/eap_chbind.c +++ b/src/modules/rlm_eap/libeap/eap_chbind.c @@ -243,7 +243,7 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps) * Compute the total length of the channel binding data. */ length = 0; - for (vp =fr_cursor_init(&cursor, first); + for (vp =fr_cursor_init(&cursor, &first); vp != NULL; vp = fr_cursor_next_by_num(&cursor, PW_UKERNA_CHBIND, VENDORPEC_UKERNA, TAG_ANY)) { length += vp->length; @@ -264,7 +264,7 @@ chbind_packet_t *eap_chbind_vp2packet(TALLOC_CTX *ctx, VALUE_PAIR *vps) * Copy the data over to our packet. */ packet = (chbind_packet_t *) ptr; - for (vp = fr_cursor_init(&cursor, first); + for (vp = fr_cursor_init(&cursor, &first); vp != NULL; vp = fr_cursor_next_by_num(&cursor, PW_UKERNA_CHBIND, VENDORPEC_UKERNA, TAG_ANY)) { memcpy(ptr, vp->vp_octets, vp->length);