Hi Zdenek, > I wonder, is there really a LOG_WARNING? And either way, it should be > LOG_ERR and no '\n' at the end. It makes me wonder whether you've > tested these changes.
The code was tested. There are 0 occurences of LOG_WARN and 7 of LOG_WARNING in src/plugins/lanplus/lanplus.c. Also, 3 lines down from my patch we see: lprintf(LOG_WARNING, "Error in open session response message : %s\n", I used this as the basis of my patch. All of your concerns are here to be seen. It sounds like there is a lot of cleanup to do in this plugin if indeed all of this is incorrect. Anton -- Fix SEGV in ipmi_lanplus_open_session If ipmi_lanplus_send_payload fails we get a NULL pointer returned. Error out straight away instead of continuing on and getting a SEGV when we dereference rsp. diff --git a/src/plugins/lanplus/lanplus.c b/src/plugins/lanplus/lanplus.c index 1f8169e..0955b11 100644 --- a/src/plugins/lanplus/lanplus.c +++ b/src/plugins/lanplus/lanplus.c @@ -2859,6 +2859,12 @@ ipmi_lanplus_open_session(struct ipmi_intf * intf) free(msg); msg = NULL; + if (!rsp) + { + lprintf(LOG_ERR, "Error sending open session message"); + return -1; + } + if (verbose) lanplus_dump_open_session_response(rsp); ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Ipmitool-devel mailing list Ipmitool-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipmitool-devel