labossip commented on code in PR #47: URL: https://github.com/apache/xerces-c/pull/47#discussion_r1231205312
########## src/xercesc/internal/ReaderMgr.cpp: ########## @@ -1080,10 +1099,7 @@ bool ReaderMgr::popReader() // Delete the current reader and pop a new reader and entity off // the stacks. // - delete fCurReader; - fCurReader = fReaderStack->pop(); - fCurEntity = fEntityStack->pop(); - + popReaderAndEntity(); Review Comment: The call to popReaderAndEntity may delete fCurEntity. This will result in the deleted pointer being passed to the EndOfEntityException through prevEntity resulting in potential issues when this pointer is derefernenced in the code that handles the exception. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org