mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
(sftpfs_open_socket): fix condition of port check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
8c040b46b8
commit
c9d9a8ba93
@ -77,8 +77,7 @@ sftpfs_open_socket (struct vfs_s_super *super, GError ** error)
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf (port, "%hu", (unsigned short) super->path_element->port);
|
||||
if (port == NULL)
|
||||
if (sprintf (port, "%hu", (unsigned short) super->path_element->port) < 0)
|
||||
{
|
||||
g_set_error (error, MC_ERROR, -1, _("sftp: Invalid port value."));
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user