Skip to content

Commit

Permalink
it's OK if there's no data
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Nov 25, 2015
1 parent 9141f71 commit f1f52fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/radius.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ ssize_t rad_packet_size(uint8_t const *data, size_t data_len)
/*
* Want at least this much before doing anything else
*/
if (data_len < RADIUS_HDR_LEN) return RADIUS_HDR_LEN;
if (!data || (data_len < RADIUS_HDR_LEN)) return RADIUS_HDR_LEN;

/*
* We want at least this much data for a real RADIUS packet/
Expand Down

0 comments on commit f1f52fe

Please sign in to comment.