Petr Kolesnikov

BUG: uninitialized pointer in httpsrv_plugin_task()

Discussion created by Petr Kolesnikov on Nov 19, 2014
Latest reply on Nov 19, 2014 by Radek Sestak

Hello,

 

I've played a little with KSDK MQX httpsrv_demo application focused to websocket part as it is my primary interest and found the application starts crashing randomly with corrupted memory. So I've tracked it down to the function httpsrv_plugin_task() in tcpip/rtcs/source/apps/httpsrv_task.c where unitialized pointer pl_context is accessed (tested to NULL). The bug is simple fixed by initializing the pointer to NULL.

 

Hopefully this helps somebody

Petr

 

PS: The websocket implementation is quite good as it passed almost all tests in AutobahnTestSuite.

Outcomes