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 47ef8b9c7..4e2471f22 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.55 2001/02/08 19:30:52 itojun Exp $"); 36RCSID("$OpenBSD: session.c,v 1.56 2001/02/16 14:03:43 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -343,12 +343,18 @@ do_authenticated(struct passwd * pw)
343 343
344 s->auth_proto = packet_get_string(&proto_len); 344 s->auth_proto = packet_get_string(&proto_len);
345 s->auth_data = packet_get_string(&data_len); 345 s->auth_data = packet_get_string(&data_len);
346 packet_integrity_check(plen, 4 + proto_len + 4 + data_len + 4, type);
347 346
348 if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER) 347 if (packet_get_protocol_flags() & SSH_PROTOFLAG_SCREEN_NUMBER) {
348 debug2("SSH_PROTOFLAG_SCREEN_NUMBER == true");
349 packet_integrity_check(plen,
350 4 + proto_len + 4 + data_len + 4, type);
349 s->screen = packet_get_int(); 351 s->screen = packet_get_int();
350 else 352 } else {
353 debug2("SSH_PROTOFLAG_SCREEN_NUMBER == false");
354 packet_integrity_check(plen,
355 4 + proto_len + 4 + data_len, type);
351 s->screen = 0; 356 s->screen = 0;
357 }
352 s->display = x11_create_display_inet(s->screen, options.x11_display_offset); 358 s->display = x11_create_display_inet(s->screen, options.x11_display_offset);
353 359
354 if (s->display == NULL) 360 if (s->display == NULL)