summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-02-16 16:02:14 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-02-16 16:02:14 +0000
commit8dcdeb84211b7bf4024317b1686c2e0fd6d01e82 (patch)
treed652b34225fa513fbfdefe5137c10fe8bc999706 /session.c
parent813f9402aeb2b71d873c159a281b834aa5e24f6c (diff)
- markus@cvs.openbsd.org 2001/02/16 14:03:43
[session.c] proper payload-length check for x11 w/o screen-number
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/session.c b/session.c
index 47ef8b9c..4e2471f2 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.55 2001/02/08 19:30:52 itojun Exp $");
+RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -343,12 +343,18 @@ do_authenticated(struct passwd * pw)
s->auth_proto = packet_get_string(&proto_len);
s->auth_data = packet_get_string(&data_len);
- packet_integrity_check(plen, 4 + proto_len + 4 + data_len + 4, type);
- if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER)
+ if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER) {
+ debug2("SSH_PROTOFLAG_SCREEN_NUMBER == true");
+ packet_integrity_check(plen,
+ 4 + proto_len + 4 + data_len + 4, type);
s->screen = packet_get_int();
- else
+ } else {
+ debug2("SSH_PROTOFLAG_SCREEN_NUMBER == false");
+ packet_integrity_check(plen,
+ 4 + proto_len + 4 + data_len, type);
s->screen = 0;
+ }
s->display = x11_create_display_inet(s->screen, options.x11_display_offset);
if (s->display == NULL)