SiliconLabs / wfx-fullMAC-driver

Silicon Laboratories WFx Wi-Fi Full-MAC driver
23 stars 9 forks source link

Avoid using sl_wfx_context before it is initialized #6

Closed thorvald closed 4 years ago

thorvald commented 4 years ago

In sl_wfx_init when SL_WFX_USE_SECURE_LINK is defined, sl_wfx_context is dereferenced before it is initialized. This patch changes the code to use the context parameter, but the line of code could also just be removed as SL_WFX_SECURELINK_DEFAULT is 0, and the entire context is memset to 0.

silabs-JulienT commented 4 years ago

Hi Thorvald,

As you pointed out, the context is memset to 0 after the call, making the line unnecessary. The line has been removed in the FMAC driver v3.2.1 (422b8c7f7b1c7113ae63281554d73b811ad7f639). Thanks for the notification.

Regards,