[PATCH] Support for ftp PASV responses not ending with ')'
Baruch Burstein
bmburstein at gmail.com
Sun Jul 12 19:34:37 UTC 2020
---
networking/parse_pasv_epsv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/networking/parse_pasv_epsv.c b/networking/parse_pasv_epsv.c
index 14f4d4258..de4032612 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)
* Server's IP is N1.N2.N3.N4 (we ignore it)
* Server's port for data connection is P1*256+P2 */
ptr = strrchr(buf, ')');
+ if (!ptr) ptr = strrchr(buf, '\r');
+ if (!ptr) ptr = strrchr(buf, '\n');
if (ptr) *ptr = '\0';
ptr = strrchr(buf, ',');
--
2.27.0
More information about the busybox
mailing list