Subject: sftp_symlink() with too small buffer

sftp_symlink() with too small buffer

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 2 Jan 2011 23:50:27 +0100 (CET)

Hi friends,

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.

Currently the code will truncate the received information and return that
shorter length. My application then has no idea if the data was exactly that
long or if it was truncated. I would prefer to get an error to allow the
application to increase the buffer and ask again.

Comments?

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