On 4 January 2011 13:31, <libs...@git.stuge.se> wrote: > - Log ----------------------------------------------------------------- > commit 164838c7dd26aa084d00dfa178b870dcda41968f > Author: Daniel Stenberg <dan...@haxx.se> > Commit: Daniel Stenberg <dan...@haxx.se> > > sftp_readdir: return error if buffer is too small > > If asked to read data into a buffer and the buffer is too small to hold > the data, this function now returns an error instead of as previously > just copy as much as fits.
As libssh2 knows the length the buffer needs to be in each case, could we add a separate API call that fetches this buffer size? This would allow very careful code to avoid the buffer length problem entirely. Alex -- Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org) _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel