channel.c: remove logically dead code, host cannot be NULL here
... host cannot be NULL in line 525, because it is always valid (e.g. at least set to "0.0.0.0") after lines 430 and 431. Reported by Coverity CID 89807.
This commit is contained in:
parent
c6d99bd3a4
commit
6af0ee567b
@ -522,8 +522,7 @@ channel_forward_listen(LIBSSH2_SESSION * session, const char *host,
|
||||
}
|
||||
else {
|
||||
listener->session = session;
|
||||
memcpy(listener->host, host ? host : "0.0.0.0",
|
||||
session->fwdLstn_host_len);
|
||||
memcpy(listener->host, host, session->fwdLstn_host_len);
|
||||
listener->host[session->fwdLstn_host_len] = 0;
|
||||
if (data_len >= 5 && !port) {
|
||||
listener->port = _libssh2_ntohu32(data + 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user