BUG: uninitialized pointer in httpsrv_plugin_task()

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

BUG: uninitialized pointer in httpsrv_plugin_task()

583 次查看
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.

标签 (1)
0 项奖励
回复
1 回复

419 次查看
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 项奖励
回复