mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-05-30 05:24:50 +03:00
channels: Fix a possible null pointer dereference.
This commit is contained in:
parent
6092596199
commit
656fd60110
@ -1600,7 +1600,7 @@ error:
|
|||||||
*/
|
*/
|
||||||
int ssh_channel_request_pty_size(ssh_channel channel, const char *terminal,
|
int ssh_channel_request_pty_size(ssh_channel channel, const char *terminal,
|
||||||
int col, int row) {
|
int col, int row) {
|
||||||
ssh_session session = channel->session;
|
ssh_session session;
|
||||||
ssh_string term = NULL;
|
ssh_string term = NULL;
|
||||||
ssh_buffer buffer = NULL;
|
ssh_buffer buffer = NULL;
|
||||||
int rc = SSH_ERROR;
|
int rc = SSH_ERROR;
|
||||||
@ -1608,6 +1608,8 @@ int ssh_channel_request_pty_size(ssh_channel channel, const char *terminal,
|
|||||||
if(channel == NULL) {
|
if(channel == NULL) {
|
||||||
return SSH_ERROR;
|
return SSH_ERROR;
|
||||||
}
|
}
|
||||||
|
session = channel->session;
|
||||||
|
|
||||||
if(terminal == NULL) {
|
if(terminal == NULL) {
|
||||||
ssh_set_error_invalid(channel->session);
|
ssh_set_error_invalid(channel->session);
|
||||||
return rc;
|
return rc;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user