summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprovos <provos@openbsd.org>2000-06-25 20:17:57 +0000
committerprovos <provos@openbsd.org>2000-06-25 20:17:57 +0000
commitd337816a9a0387cd648b3edebbdccdf0df727e78 (patch)
tree5b4c654f6c1213beca307a32aa3d23f0745fa73e
parentexplain about crash dumps and swap encryption (diff)
downloadwireguard-openbsd-d337816a9a0387cd648b3edebbdccdf0df727e78.tar.xz
wireguard-openbsd-d337816a9a0387cd648b3edebbdccdf0df727e78.zip
correct check for bad channel ids; from Wei Dai <weidai@eskimo.com>
-rw-r--r--usr.bin/ssh/channels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 15484fa2913..5ee5624eca4 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -17,7 +17,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.62 2000/06/20 01:39:39 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.63 2000/06/25 20:17:57 provos Exp $");
#include "ssh.h"
#include "packet.h"
@@ -135,7 +135,7 @@ Channel *
channel_lookup(int id)
{
Channel *c;
- if (id < 0 && id > channels_alloc) {
+ if (id < 0 || id > channels_alloc) {
log("channel_lookup: %d: bad id", id);
return NULL;
}