Skip to content

Commit

Permalink
HPCC-25224: Stop pull parser skip requests on END_DOCUMENT
Browse files Browse the repository at this point in the history
Throw an exception when END_DOCUMENT is encountered. This indicates improper
usage of the sub-tree skipping methods.

Signed-off-by: Tim Klemm <Tim.Klemm@lexisnexisrisk.com>
  • Loading branch information
Tim Klemm authored and Tim Klemm committed Jan 17, 2025
1 parent 3612b8a commit 456e511
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions esp/bindings/SOAP/xpp/xpp/XmlPullParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ namespace xpp {
case XmlPullParser::END_TAG:
--level;
break;
case XmlPullParser::END_DOCUMENT:
throw XmlPullParserException(
string("unexpected end of document while skipping sub tree")
+tokenizer.getPosDesc(), tokenizer.getLineNumber(), tokenizer.getColumnNumber());
}
}
return hasChildren;
Expand Down

0 comments on commit 456e511

Please sign in to comment.