1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-03 20:16:33 +00:00

Fix off-by-one bug

This commit is contained in:
nnposter
2019-09-07 22:50:33 +00:00
parent 3bb6062ede
commit d608b26eb5

View File

@@ -1031,7 +1031,7 @@ function negotiate_v1(smb, overrides)
smb.server_guid, pos = string.unpack("<c16", data, pos)
-- do we have a security blob?
if ( #data - pos > 0 ) then
if ( #data - pos + 1 > 0 ) then
smb.security_blob = data:sub(pos)
pos = #data + 1
end