rapid7/metasploit-framework — pull request #1325 by kernelsmith (2013-01-17 06:19:17+00:00)
Title: adds check for empty data before sending to parser [fixes RM7269]

[fixes RM7269]
we discussed the solution to this bug a lot on IRC and in the ticket
itself, the consensus was to fix it as far upstream as possible before
sending to the parsers so as to avoid any future bugs of the same
nature, so this commit adds a check to import_nmap_xml to see if the
data is empty before passing it on to the parser, whether that parser
is nokogiri or the legacy parser.

db_nmap -h now produces the expected output and db_nmap still works as
expected.