Skip to content

Commit

Permalink
length in bytes, not chbind packets
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jun 27, 2017
1 parent 6f46e5e commit 589e72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/rlm_eap/libeap/eap_chbind.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static size_t chbind_get_data(chbind_packet_t const *packet,
}

ptr = (uint8_t const *) packet;
end = ptr + talloc_array_length(packet);
end = ptr + talloc_array_length((uint8_t const *) packet);

ptr++; /* skip the code at the start of the packet */
while (ptr < end) {
Expand Down Expand Up @@ -182,7 +182,7 @@ PW_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind)
/* Add the channel binding attributes to the fake packet */
data_len = chbind_get_data(chbind->request, CHBIND_NSID_RADIUS, &attr_data);
if (data_len) {
rad_assert(data_len <= talloc_array_length(chbind->request));
rad_assert(data_len <= talloc_array_length((uint8_t const *) chbind->request));

while (data_len > 0) {
int attr_len = rad_attr2vp(fake->packet, NULL, NULL, NULL, attr_data, data_len, &vp);
Expand Down

0 comments on commit 589e72d

Please sign in to comment.