aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/parse_pasv_epsv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/networking/parse_pasv_epsv.c b/networking/parse_pasv_epsv.c
index 14f4d4258..314237be6 100644
--- a/networking/parse_pasv_epsv.c
+++ b/networking/parse_pasv_epsv.c
@@ -38,6 +38,8 @@ int FAST_FUNC parse_pasv_epsv(char *buf)
38 * Server's IP is N1.N2.N3.N4 (we ignore it) 38 * Server's IP is N1.N2.N3.N4 (we ignore it)
39 * Server's port for data connection is P1*256+P2 */ 39 * Server's port for data connection is P1*256+P2 */
40 ptr = strrchr(buf, ')'); 40 ptr = strrchr(buf, ')');
41 if (!ptr) ptr = strrchr(buf, '\r'); /* for PASV responses not ending with ')' */
42 if (!ptr) ptr = strrchr(buf, '\n'); /* for PASV responses not ending with ')' */
41 if (ptr) *ptr = '\0'; 43 if (ptr) *ptr = '\0';
42 44
43 ptr = strrchr(buf, ','); 45 ptr = strrchr(buf, ',');