www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: sftp_symlink() with too small buffer

Re: sftp_symlink() with too small buffer

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 3 Jan 2011 17:23:35 +0100 (CET)

On Mon, 3 Jan 2011, Peter Stuge wrote:

>> I'd like to start having libssh2_sftp_symlink_ex() return
>> LIBSSH2_ERROR_BUFFER_TOO_SMALL if the caller provides a too small buffer
>> that won't fit the received file name when doing SSH_FXP_REALPATH.
>
> It's an API change, but I think it is one we need.

Yes, it is a minor behavior modification but I can't think of another way to
do it (adding a separate function just for this little change feels bad) and I
guess this change will only affect a small amount of users.

BTW, I noticed the same flaw and need in the sftp_readdir function, and I
guess it may also be elsewhere once we start looking closer.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-01-03

the libssh2 team