osaf/tools/safimm/immcfg/imm_import.cc |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Add parser state check after setting admin owner to prevent possible core dumps

diff --git a/osaf/tools/safimm/immcfg/imm_import.cc 
b/osaf/tools/safimm/immcfg/imm_import.cc
--- a/osaf/tools/safimm/immcfg/imm_import.cc
+++ b/osaf/tools/safimm/immcfg/imm_import.cc
@@ -660,6 +660,9 @@ static void createImmObject(ParserState*
        // Note! it must be called before state->objectName is "null 
truncated"!!
        setAdminOwnerHelper(state, &parentName);
 
+       if(state->ctxt->instate == XML_PARSER_EOF)
+               return;
+
 #ifdef TRACE_8
        /* Get the length of the DN and truncate state->objectName */
        if (parentName.length > 0) {

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to