← Commit list

06a407c62

Denys Vlasenko
Denys Vlasenko
2020-07-19
SUCCESS Duration: 152s

Subject

networking: support ftp PASV responses not ending with ')'

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/parse_pasv_epsv.c+2 -0
@@ -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'); /* for PASV responses not ending with ')' */
+ if (!ptr) ptr = strrchr(buf, '\n'); /* for PASV responses not ending with ')' */
if (ptr) *ptr = '\0';
ptr = strrchr(buf, ',');