diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-16 14:03:44 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-02-16 14:03:44 +0000 |
commit | e45296350e7f6bdd6160c5438b890a9dc1f7df5c (patch) | |
tree | 01353bb5a31123c33c299b73bfb9f7550f33a870 /usr.bin/ssh | |
parent | 59ca3ca71133c9cfe0a5a5d8226148c08d5985a4 (diff) |
proper payload-length check for x11 w/o screen-number
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/session.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 50bf36787f4..a9b607db54f 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.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" @@ -307,12 +307,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) |