1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 08:59:01 +00:00

String value in "elements" contains null bytes so "z" packing cannot be used. See #1802

This commit is contained in:
nnposter
2019-11-13 23:59:55 +00:00
parent 90f177843b
commit 71034a0b09

View File

@@ -127,7 +127,7 @@ function toBson(dict)
end
dbg("Packet length is %d",length)
--Final pack
return true, string.pack("<I4z", length, elements)
return true, string.pack("<I4", length) .. elements .. "\0"
end
-- Reads a null-terminated string. If length is supplied, it is just cut