mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 11:22:05 +00:00
ssh2: fix positive mpint packing. Closes #2338
This commit is contained in:
parent
d8cf5e6eac
commit
d4b46b5b43
2 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
#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
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue