Skip to content

Commit

Permalink
Missed zero length field check
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Dec 3, 2017
1 parent 585970d commit 29fa930
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/rlm_eap/lib/sim/decode.c
Expand Up @@ -420,6 +420,11 @@ static ssize_t sim_decode_tlv(TALLOC_CTX *ctx, vp_cursor_t *cursor,
return rcode;
}

if (sim_at_len == 0) {
fr_strerror_printf("%s: Malformed nested attribute %d: Length field 0", __FUNCTION__, sim_at);
goto error;
}

/*
* Padding attributes are cleartext inside of
* encrypted TLVs to pad out the value to the
Expand Down

0 comments on commit 29fa930

Please sign in to comment.