summaryrefslogtreecommitdiffstats
path: root/libssh/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'libssh/packet.c')
-rw-r--r--libssh/packet.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libssh/packet.c b/libssh/packet.c
index 4802fe6..179341f 100644
--- a/libssh/packet.c
+++ b/libssh/packet.c
@@ -460,7 +460,9 @@ void packet_parse(SSH_SESSION *session){
case SSH_SMSG_STDOUT_DATA:
case SSH_SMSG_STDERR_DATA:
case SSH_SMSG_EXITSTATUS:
- channel_handle1(session,type);
+ if (channel_handle1(session,type) < 0) {
+ return;
+ }
return;
case SSH_MSG_DEBUG:
case SSH_MSG_IGNORE:
@@ -525,7 +527,10 @@ static int packet_wait1(SSH_SESSION *session,int type,int blocking){
case SSH_SMSG_STDOUT_DATA:
case SSH_SMSG_STDERR_DATA:
case SSH_SMSG_EXITSTATUS:
- channel_handle1(session,type);
+ if (channel_handle1(session,type) < 0) {
+ leave_function();
+ return -1;
+ }
break;
case SSH_MSG_DEBUG:
case SSH_MSG_IGNORE: