1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Close an open start tag before a fatal error.

This is part of the error handler that attempts to close open XML tags
at a fatal error. The case wasn't handled where a fatal error happened
while a start tag was still open (didn't have its '>' written yet). This
came from a bug report from David Hingos.

http://seclists.org/nmap-dev/2012/q1/514
This commit is contained in:
david
2012-03-09 00:16:39 +00:00
parent e1576d1d14
commit fa0713e041
3 changed files with 10 additions and 0 deletions

5
xml.cc
View File

@@ -412,6 +412,11 @@ int xml_depth() {
return xml.element_stack.size();
}
/* Return true iff a root element has been started. */
bool xml_tag_open() {
return xml.tag_open;
}
/* Return true iff a root element has been started. */
bool xml_root_written() {
return xml.root_written;