Giter VIP home page Giter VIP logo

Comments (3)

JacobBarthelmeh avatar JacobBarthelmeh commented on May 27, 2024

Hi bagder,

Thank you for the report. I'm looking into reproducing the problem. In the mean time if this is being induced by a call to wolfSSH_SFTP_Open please have the input argument "handleSz" set to a length of 256 with a matching "handle" input buffer that is at least 256 bytes (or WOLFSSH_MAX_HANDLE from wolfssh/wolfsftp.h). This is the max handle size that can be sent across according to the RFC and it may be that the buffer being passed in is too small to hold the handle found from the SFTP packet.

Regards,
Jacob

from wolfssh.

JacobBarthelmeh avatar JacobBarthelmeh commented on May 27, 2024

Hi @bagder,

After looking over the branch linked to I think setting the handleSz will resolve the issue.

In lib/wolfssh.c

507     case SSH_SFTP_DOWNLOAD_INIT:
(add)     sshc->handleSz = WOLFSSH_MAX_HANDLE; /* size of "handle" buffer in struct from lib/ssh.h */
508       rc = wolfSSH_SFTP_Open(sshc->ssh_session, sftp_scp->path,
509                              WOLFSSH_FXF_READ, NULL,
510                              sshc->handle, &sshc->handleSz);

~jacob

from wolfssh.

bagder avatar bagder commented on May 27, 2024

Yes, that seems to fix it!

Can I suggest you document this somewhere? I was certainly not obvious to me...

from wolfssh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.