Skip to content

Commit

Permalink
XMLParser: fix invalid read, section was cleaned up before it was use…
Browse files Browse the repository at this point in the history
…d in iteration again
  • Loading branch information
andresailer authored and gaede committed Mar 27, 2019
1 parent 1909d8c commit a1e6a70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/src/XMLParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ namespace marlin{
// preprocess groups: ---------------------------------------------------------------------------------
// simply copy all group parameters to the processors
// and then copy the processors to the root node <Marlin>
while( (section = root->IterateChildren( "group", section ) ) != 0 ){
// 'section' comes from above as first execute child, get the next section so we
// do not cleanup the execute section in loop body below, only the groups
TiXmlNode* nextSection = root->IterateChildren("group", section);
while((section = nextSection) != 0){
nextSection = root->IterateChildren("group", section);

std::vector<TiXmlNode*> groupParams ;

Expand Down

0 comments on commit a1e6a70

Please sign in to comment.