浏览代码

[ftp] Terminate processing after receiving an error

When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply()
invoked ftp_done() to close connections, but did not return, and the
rest of code in this function could try to send commands to the closed
control connection.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
tags/v0.9.4
Sergey Vlasov 17 年前
父节点
当前提交
e6cd16946a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1
    0
      src/net/tcp/ftp.c

+ 1
- 0
src/net/tcp/ftp.c 查看文件

221
 		 ( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
221
 		 ( ( status_major == '3' ) && ( ftp->state == FTP_USER ) ) ) ){
222
 		/* Flag protocol error and close connections */
222
 		/* Flag protocol error and close connections */
223
 		ftp_done ( ftp, -EPROTO );
223
 		ftp_done ( ftp, -EPROTO );
224
+		return;
224
 	}
225
 	}
225
 
226
 
226
 	/* Open passive connection when we get "PASV" response */
227
 	/* Open passive connection when we get "PASV" response */

正在加载...
取消
保存