mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Fix NSE error: attempt to get length of a number
NSE: Script Engine Scan Aborted.
An error was thrown by the engine: attempt to get length of a number
value
stack traceback:
[C]: in function 'port_set_output'
/home/rt/builds/nmap/nse_main.lua:314: in function 'set_output'
/home/rt/builds/nmap/nse_main.lua:947: in function 'run'
/home/rt/builds/nmap/nse_main.lua:1330: in function
</home/rt/builds/nmap/nse_main.lua:1237>
[C]: in ?
This now allows return of anything stringifiable as second return value
without crashing (though this may not be what the script author intends,
better to not crash)
This commit is contained in:
parent
a49667aa02
commit
c3f88169a4
1 changed files with 1 additions and 1 deletions
|
|
@ -297,7 +297,7 @@ do
|
|||
local tab, str
|
||||
|
||||
if r2 then
|
||||
tab, str = r1, r2;
|
||||
tab, str = r1, tostring(r2);
|
||||
elseif type(r1) == "string" then
|
||||
tab, str = nil, r1;
|
||||
elseif r1 == nil then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue