=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/packet.c,v retrieving revision 1.144 retrieving revision 1.144.2.1 diff -u -r1.144 -r1.144.2.1 --- src/usr.bin/ssh/packet.c 2006/09/16 19:53:37 1.144 +++ src/usr.bin/ssh/packet.c 2006/11/08 00:42:10 1.144.2.1 @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.144 2006/09/16 19:53:37 djm Exp $ */ +/* $OpenBSD: packet.c,v 1.144.2.1 2006/11/08 00:42:10 brad Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -682,6 +682,9 @@ */ after_authentication = 1; for (mode = 0; mode < MODE_MAX; mode++) { + /* protocol error: USERAUTH_SUCCESS received before NEWKEYS */ + if (newkeys[mode] == NULL) + continue; comp = &newkeys[mode]->comp; if (comp && !comp->enabled && comp->type == COMP_DELAYED) { packet_init_compression();