mirror of
https://github.com/curl/curl.git
synced 2026-07-24 09:07:47 +03:00
- Daniel Johnson founded a flaw in the code convering sftp-errors to libcurl
errors.
This commit is contained in:
parent
e47c939822
commit
7a642c8bf1
3 changed files with 6 additions and 5 deletions
|
|
@ -230,15 +230,12 @@ kbd_callback(const char *name, int name_len, const char *instruction,
|
|||
(void)abstract;
|
||||
} /* kbd_callback */
|
||||
|
||||
static CURLcode sftp_libssh2_error_to_CURLE(unsigned long err)
|
||||
static CURLcode sftp_libssh2_error_to_CURLE(int err)
|
||||
{
|
||||
switch (err) {
|
||||
case LIBSSH2_FX_OK:
|
||||
return CURLE_OK;
|
||||
|
||||
case LIBSSH2_ERROR_ALLOC:
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
case LIBSSH2_FX_NO_SUCH_FILE:
|
||||
case LIBSSH2_FX_NO_SUCH_PATH:
|
||||
return CURLE_REMOTE_FILE_NOT_FOUND;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue