summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
authordjm <djm>2010-12-01 01:02:14 +0000
committerdjm <djm>2010-12-01 01:02:14 +0000
commitd8017ef507478a5e463618df3a50c335c299e0f4 (patch)
treeb2977ebd22fb1196046febe578360c40deeb0327 /clientloop.c
parentb0374889532c316fb59fe1d598aa9ed696c61d73 (diff)
downloadopenssh-d8017ef507478a5e463618df3a50c335c299e0f4.tar.gz
- djm@cvs.openbsd.org 2010/11/23 23:57:24
[clientloop.c] avoid NULL deref on receiving a channel request on an unknown or invalid channel; report bz#1842 from jchadima AT redhat.com; ok dtucker@
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c
index 076386cc..91eea856 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.225 2010/11/21 01:01:13 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.226 2010/11/23 23:57:24 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1933,7 +1933,7 @@ client_input_channel_req(int type, u_int32_t seq, void *ctxt)
}
packet_check_eom();
}
- if (reply) {
+ if (reply && c != NULL) {
packet_start(success ?
SSH2_MSG_CHANNEL_SUCCESS : SSH2_MSG_CHANNEL_FAILURE);
packet_put_int(c->remote_id);