[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 22/125: libssh2: remove dead code from SSH_SFTP_QUO
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 22/125: libssh2: remove dead code from SSH_SFTP_QUOTE |
Date: |
Sun, 21 Jan 2018 23:41:17 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 4401409468f590520dd5d0f0a55607eefa5ff4c1
Author: Daniel Stenberg <address@hidden>
AuthorDate: Mon Dec 4 09:00:34 2017 +0100
libssh2: remove dead code from SSH_SFTP_QUOTE
Figured out while reviewing code in the libssh backend. The pointer was
checked for NULL after having been dereferenced, so we know it would
always equal true or it would've crashed.
Pointed-out-by: Nikos Mavrogiannopoulos
Bug #2143
Closes #2148
---
lib/ssh.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/ssh.c b/lib/ssh.c
index ef169ade7..a4dd878bf 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1142,6 +1142,9 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
/*
* Support some of the "FTP" commands
+ *
+ * 'sshc->quote_item' is already verified to be non-NULL before it
+ * switched to this state.
*/
char *cmd = sshc->quote_item->data;
sshc->acceptfail = FALSE;
@@ -1184,7 +1187,7 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
state(conn, SSH_SFTP_NEXT_QUOTE);
break;
}
- if(cmd) {
+ {
/*
* the arguments following the command must be separated from the
* command with a space so we can check for it unconditionally
@@ -1314,9 +1317,6 @@ static CURLcode ssh_statemach_act(struct connectdata
*conn, bool *block)
break;
}
}
- if(!sshc->quote_item) {
- state(conn, SSH_SFTP_GETINFO);
- }
break;
case SSH_SFTP_NEXT_QUOTE:
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 09/125: libssh2: return CURLE_UPLOAD_FAILED on failure to upload, (continued)
- [GNUnet-SVN] [gnurl] 09/125: libssh2: return CURLE_UPLOAD_FAILED on failure to upload, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 05/125: curlver: towards 7.57.1, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 06/125: RELEASE-NOTES: synced with af8cc7a69, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 13/125: lib582: do not verify host for SFTP, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 16/125: libssh: fix minor static code analyzer nits, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 18/125: libssh: corrected use of sftp_statvfs() in SSH_SFTP_QUOTE_STATVFS, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 14/125: travis: use pip2 instead of pip, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 15/125: openssl: pkcs12 is supported by boringssl, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 19/125: RESOURCES: update spec names, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 21/125: ssh-libssh.c: please checksrc, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 22/125: libssh2: remove dead code from SSH_SFTP_QUOTE,
gnunet <=
- [GNUnet-SVN] [gnurl] 08/125: libssh2: send the correct CURLE error code on scp file not found, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 03/125: SSL: Avoid magic allocation of SSL backend specific data, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 32/125: URL: tolerate backslash after drive letter for FILE:, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 17/125: libssh: no need to call sftp_get_error as ssh_get_error is sufficient, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 28/125: conncache: only allow multiplexing within same multi handle, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 40/125: curl: limit -# update frequency for unknown total size, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 31/125: tests: added netinet/in6.h includes in test servers, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 41/125: configure: add AX_CODE_COVERAGE only if using gcc, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 36/125: openldap: fix checksrc nits, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 49/125: RESOLVE: output verbose text when trying to set a duplicate name, gnunet, 2018/01/21