BUG: uninitialized pointer in httpsrv_plugin_task()

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BUG: uninitialized pointer in httpsrv_plugin_task()

519 Views
PetrK
Contributor II

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 :smileyhappy:

Petr

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

Labels (1)
0 Kudos
1 Reply

355 Views
RadekS
NXP Employee
NXP Employee

Thank you for your bug report.

It is known issue and it was already fixed at development branch – so it will be fixed in next version of KSDK.

Function httpsrv_plugin_task() in httpsrv_task.c file contains additional two lines:

pl_context = NULL;

pl_callbacks = NULL;

just below line “server->plugin_tid = _task_get_id();”


Have a great day,
RadekS

0 Kudos