Ticket #11048: filezilla_fix_epsv.patch

File filezilla_fix_epsv.patch, 721 bytes (added by Tommy Wu, 6 years ago)

fix epsv parse

  • src/engine/ftpcontrolsocket.cpp

    diff -Nur filezilla.orig/src/engine/ftpcontrolsocket.cpp filezilla/src/engine/ftpcontrolsocket.cpp
    old new  
    36943694        return false;
    36953695    }
    36963696
    3697     size_t pos2 = m_Response.substr(pos + 4).find(L"|)", pos + 4);
     3697    size_t pos2 = m_Response.substr(pos + 4).find(L"|)");
    36983698    if (pos2 == std::wstring::npos || !pos2) {
    36993699        return false;
    37003700    }
    37013701
    3702     std::wstring number = m_Response.substr(pos + 4, pos2 - pos - 4);
     3702    std::wstring number = m_Response.substr(pos + 4, pos2);
    37033703    auto port = fz::to_integral<unsigned int>(number);
    37043704   
    37053705    if (port == 0 || port > 65535) {