File 0797-ftp-Break-loop.patch of Package erlang

From 9a1c36c10abfe8e4a6d59c0e8f6bccf5a54d0a02 Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Tue, 10 Sep 2019 15:43:40 +0200
Subject: [PATCH] ftp: Break loop

when a partial message is in CtrlData. Appending <<>> from activate_ctrl_connection (2nd clause) will cause the {continue,NewCtrlData} to be selected. But since NewCtrlData == CtrlData, an infinite loop did occur.
---
 lib/ftp/src/ftp.erl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index 18cd8c7524..e9be7b8ff7 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -1591,6 +1591,9 @@ handle_info({Transport, Socket, Data}, #state{csock = {Transport, Socket},
 						   ctrl_data = 
 						       {NextMsgData, [], start}})
 	    end;
+	{continue, CtrlData} ->
+	    ?DBG('   ...Continue... ctrl_data=~p~n', [CtrlData]),
+	    {noreply, State};
 	{continue, NewCtrlData} ->
 	    ?DBG('   ...Continue... ctrl_data=~p~n',[NewCtrlData]),
 	    activate_ctrl_connection(State),
-- 
2.16.4

openSUSE Build Service is sponsored by