Skip to content

Commit

Permalink
Fix arbitary length
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSampanis committed Oct 17, 2014
1 parent 535f984 commit 103f165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dissectors/ec_dhcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ FUNC_DECODER(dissector_dhcp)
(opt = get_dhcp_option(DHCP_OPT_FQDN, options, end)) != NULL)
{
u_char size = opt[0];
if ((opt + size + 2) > end)
if ((opt + size + 2) > end || size < 3)
{
// the +2 accounts for a-rr and ptr-rr
return NULL;
Expand Down

0 comments on commit 103f165

Please sign in to comment.