mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
ssh2: fix positive mpint packing. Closes #2338
This commit is contained in:
@@ -57,7 +57,7 @@ transport.pack_mpint = function( bn )
|
||||
local bytes, packed
|
||||
bytes = bn:num_bytes()
|
||||
packed = bn:tobin()
|
||||
if bytes % 8 == 0 then
|
||||
if bn:num_bits() % 8 == 0 then
|
||||
bytes = bytes + 1
|
||||
packed = '\0' .. packed
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user