mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-07 02:39:48 +09:00
channels: Fix a possible null pointer dereference.
(cherry picked from commit 656fd60110)
This commit is contained in:
@@ -1495,11 +1495,16 @@ error:
|
||||
*/
|
||||
int ssh_channel_request_pty_size(ssh_channel channel, const char *terminal,
|
||||
int col, int row) {
|
||||
ssh_session session = channel->session;
|
||||
ssh_session session;
|
||||
ssh_string term = NULL;
|
||||
ssh_buffer buffer = NULL;
|
||||
int rc = SSH_ERROR;
|
||||
|
||||
if (channel == NULL) {
|
||||
return SSH_ERROR;
|
||||
}
|
||||
session = channel->session;
|
||||
|
||||
enter_function();
|
||||
#ifdef WITH_SSH1
|
||||
if (channel->version==1) {
|
||||
|
||||
Reference in New Issue
Block a user