Skip to content

Commit

Permalink
RADIUS can only have 64K packets max. Shuts up Coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Jan 15, 2025
1 parent 4d332ea commit e1a5202
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/protocols/radius/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ static ssize_t decode_extended(TALLOC_CTX *ctx, fr_pair_list_t *out,
slen = fr_radius_decode_pair_value(vp, &vp->vp_group, child, data + 3, data[1] - 3, packet_ctx);
fr_dict_attr_unknown_free(&child);
if (slen < 0 ) return slen;

fr_assert(slen < (1 << 16));
return 3 + slen;
}

Expand Down Expand Up @@ -2082,6 +2084,8 @@ ssize_t fr_radius_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out,
packet_ctx);
if (ret < 0) return ret;

fr_assert(ret < (1 << 16));

return 2 + ret;
}

Expand Down

0 comments on commit e1a5202

Please sign in to comment.