Add iterator safety check in DoxygenParser::parse
If the code called by DoxygenParser::parse does not behave correctly, it may move the iterator m_tokenListIt past the value endParsingIndex. This was not caught by the previous checks and could lead to dereferencing an invalid m_tokenListIt iterator value (and segfault). This is now protected against by using a less than check in the while loop instead of not equals. A warning is also printed if endParsingIndex is exceeded.
This commit is contained in:
parent
85a4c7ffc0
commit
841d4b5fb9
2 changed files with 8 additions and 1 deletions
|
|
@ -221,6 +221,7 @@
|
|||
#define WARN_DOXYGEN_HTML_ERROR 563
|
||||
#define WARN_DOXYGEN_COMMAND_ERROR 564
|
||||
#define WARN_DOXYGEN_UNKNOWN_CHARACTER 565
|
||||
#define WARN_DOXYGEN_UNEXPECTED_ITERATOR_VALUE 566
|
||||
|
||||
/* -- Reserved (600-799) -- */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue