Subject: Possible (duplicate) bug in libssh2_sftp_readdir_ex in blocking mode

Possible (duplicate) bug in libssh2_sftp_readdir_ex in blocking mode

From: <>
Date: Thu, 30 Jul 2009 17:22:55 +0100

I've been dancing around this one for a couple of days now, but since
readdir has been mentioned recently, I thought I'd chip in. Specifically
it's been returning -1 when the remote directory has more than about 30
files in it when in blocking mode, but works as I'd expect in non-blocking
mode. Number of files needed to cause the problem varies slightly, possibly
due to filename lengths (mine are between 27 and 35 each).

I switch between blocking modes by changing the call on line 24. My remote
is a standard Debian machine running latest sshd from stable (lenny),
reports as version 5.1p1-5. I've tried it with 3 different remotes all
running the same server and 3 different clients, all with different
configurations and OSes but the same library, all give the same results.
Running psftp or other clients to the same server have no problems

Attached is a VC6 snippet that reproduces it for me, can someone else try it
and let me know if it's my library build (from snapshot 20090730) or my
usage or if there really is something wrong?

Any help appreciated,

Mark Smith


Received on 2009-07-30