Add a check to dhcp.lua to avoid crash and provide debug output

This commit is contained in:
dmiller 2017-03-01 20:41:20 +00:00
parent edcc648a39
commit 69e1423363

View file

@ -508,6 +508,11 @@ function dhcp_parse(data, transaction_id)
-- Parse the options
result['options'] = {}
while true do
if #data - pos < 2 then
stdnse.debug1("Unexpected end of options")
break
end
local option, length
pos, option, length = bin.unpack(">CC", data, pos)