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.
Этот коммит содержится в:
родитель
c6d99bd3a4
Коммит
6af0ee567b
@ -522,8 +522,7 @@ channel_forward_listen(LIBSSH2_SESSION * session, const char *host,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
listener->session = session;
|
listener->session = session;
|
||||||
memcpy(listener->host, host ? host : "0.0.0.0",
|
memcpy(listener->host, host, session->fwdLstn_host_len);
|
||||||
session->fwdLstn_host_len);
|
|
||||||
listener->host[session->fwdLstn_host_len] = 0;
|
listener->host[session->fwdLstn_host_len] = 0;
|
||||||
if (data_len >= 5 && !port) {
|
if (data_len >= 5 && !port) {
|
||||||
listener->port = _libssh2_ntohu32(data + 1);
|
listener->port = _libssh2_ntohu32(data + 1);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user