Menu

#196 FreeRTOS+TCP: Crash in FTP server if transfer socket cannot be created

v1.0 (example)
open
nobody
5
2019-07-02
2019-07-02
No

Version: FreeRTOS+TCP distributed as part of FreeRTOS v10.2.1
File: FreeRTOS_FTP_server.c, file version v2.03

In function prvTransferConnect(), if the socket cannot be created the return value xResult is set to an error code. However, the return value from prvTransferConnect() is treated as boolean by all callers of that function. This results in a NULL pointer dereference when pxClient->xTransferSocket is used later on. Example: in the handling of ECMD_PASV in prvProcessCommand().

Fix: Function prvTransferConnect(), line 901: Change -pdFREERTOS_ERRNO_ENOMEM to pdFALSE.

Discussion


Log in to post a comment.

Monday.com Logo