diff options
author | 2004-12-23 17:35:48 +0000 | |
---|---|---|
committer | 2004-12-23 17:35:48 +0000 | |
commit | f794ad025a0958062f13f4a12cd1c0f8ef8876fb (patch) | |
tree | 6cfcafbbc85eeb3abbb74fe81853aae2620ab539 | |
parent | in getpeerbydesc(), complain if we find more than one match and return NULL (diff) | |
download | wireguard-openbsd-f794ad025a0958062f13f4a12cd1c0f8ef8876fb.tar.xz wireguard-openbsd-f794ad025a0958062f13f4a12cd1c0f8ef8876fb.zip |
check for NULL; from mpech
-rw-r--r-- | usr.bin/ssh/session.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index c6e624f8dec..00a1e794660 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.180 2004/07/28 09:40:29 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.181 2004/12/23 17:35:48 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -242,6 +242,10 @@ do_authenticated1(Authctxt *authctxt) u_int proto_len, data_len, dlen, compression_level = 0; s = session_new(); + if (s == NULL) { + error("no more sessions"); + return; + } s->authctxt = authctxt; s->pw = authctxt->pw; |