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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user