mirror of
https://github.com/nmap/nmap.git
synced 2026-01-05 06:09:00 +00:00
Correct to DTD, explicitly show empty output. See #2216
This shouldn't happen, so we'll print a "bug" error message so users notify us.
This commit is contained in:
@@ -521,6 +521,10 @@ void ScriptResult::write_xml() const
|
||||
output_str = get_output_str();
|
||||
if (!output_str.empty())
|
||||
xml_attribute("output", "%s", protect_xml(output_str).c_str());
|
||||
else {
|
||||
error("Bug in %s: no string output.", get_id());
|
||||
xml_attribute("output", "%s", "");
|
||||
}
|
||||
|
||||
/* Any table output? */
|
||||
lua_rawgeti(L_NSE, LUA_REGISTRYINDEX, output_ref);
|
||||
|
||||
Reference in New Issue
Block a user