mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 05:31:31 +00:00
ssh2: fix positive mpint packing. Closes #2338
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
#Nmap Changelog ($Id$); -*-text-*-
|
#Nmap Changelog ($Id$); -*-text-*-
|
||||||
|
|
||||||
|
o [GH#2338][NSE] Fix mpint packing in ssh2 library, which was causing OpenSSH
|
||||||
|
errors like "ssh_dispatch_run_fatal: bignum is negative" [Sami Loone]
|
||||||
|
|
||||||
o Additional Python 3 update fixes by Sam James, Daniel Miller. Special thanks
|
o Additional Python 3 update fixes by Sam James, Daniel Miller. Special thanks
|
||||||
to those who opened Python 3-related issues and pull requests: Eli Schwartz, Romain
|
to those who opened Python 3-related issues and pull requests: Eli Schwartz, Romain
|
||||||
Leonard, Varunram Ganesh, Pavel Zhukov, Carey Balboa, Hasan Aliyev, and others.
|
Leonard, Varunram Ganesh, Pavel Zhukov, Carey Balboa, Hasan Aliyev, and others.
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ transport.pack_mpint = function( bn )
|
|||||||
local bytes, packed
|
local bytes, packed
|
||||||
bytes = bn:num_bytes()
|
bytes = bn:num_bytes()
|
||||||
packed = bn:tobin()
|
packed = bn:tobin()
|
||||||
if bytes % 8 == 0 then
|
if bn:num_bits() % 8 == 0 then
|
||||||
bytes = bytes + 1
|
bytes = bytes + 1
|
||||||
packed = '\0' .. packed
|
packed = '\0' .. packed
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user