]> begriffs open source - freertos/commit
Check socket binding result before doing anything with socket. (This is to address...
authorYuhui.Zheng <10982575+yuhui-zheng@users.noreply.github.com>
Wed, 4 Dec 2019 07:52:49 +0000 (07:52 +0000)
committerYuhui.Zheng <10982575+yuhui-zheng@users.noreply.github.com>
Wed, 4 Dec 2019 07:52:49 +0000 (07:52 +0000)
commit1deeb6dd84235604fa9dfedc434da357889aa858
tree778801f8a1d35d66bc11b2ef3c2aed8b0f675773
parent9491af1fd73367134c1ae16d2eea1ac25c007816
Check socket binding result before doing anything with socket. (This is to address ARG findings.) Breaking the single return rule here, due to precedent violation at line 1039 and 1144.

prvTransferConnect() now returns:
- pdTRUE: everything's good. pdTRUE = 1.
- -pdFREERTOS_ERRNO_ENOMEM: FreeRTOS_socket() failed. -pdFREERTOS_ERRNO_ENOMEM = -12.
- -pdFREERTOS_ERRNO_EINVAL || -pdFREERTOS_ERRNO_ECANCELED: FreeRTOS_bind() failed. Negative values.

Thus, at line 569 and line 617, needs to check != pdTRUE instead of == pdFALSE.

This commit is done on behalf of Alfred.
FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c