channels: Fix a possible null pointer dereference.

(cherry picked from commit 656fd60110)
This commit is contained in:
Andreas Schneider
2012-10-05 11:16:03 +02:00
parent dc8f0cddee
commit 3eac8e1c18

View File

@@ -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) {