mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Add a check to dhcp.lua to avoid crash and provide debug output
This commit is contained in:
parent
edcc648a39
commit
69e1423363
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue