summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-05-25 11:01:01 +0000
committerColin Watson <cjwatson@debian.org>2005-05-25 11:01:01 +0000
commite88de75a1a236779a10e8ccbcc51d25308be8840 (patch)
tree7495477a2a7d0cac17a9fcded020b6ea816182ef /packet.c
parent30a0f9443782cd9d7308acd09430bf586186aa55 (diff)
parent5d05471f6657646d1d6500c7c43134462c407ee6 (diff)
Merge 4.0p1 to the trunk.
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/packet.c b/packet.c
index b062c0436..e2607b20f 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.115 2004/06/21 17:36:31 avsm Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.116 2004/10/20 11:48:53 markus Exp $");
41 41
42#include "openbsd-compat/sys-queue.h" 42#include "openbsd-compat/sys-queue.h"
43 43
@@ -995,6 +995,8 @@ packet_read_poll1(void)
995 buffer_len(&compression_buffer)); 995 buffer_len(&compression_buffer));
996 } 996 }
997 type = buffer_get_char(&incoming_packet); 997 type = buffer_get_char(&incoming_packet);
998 if (type < SSH_MSG_MIN || type > SSH_MSG_MAX)
999 packet_disconnect("Invalid ssh1 packet type: %d", type);
998 return type; 1000 return type;
999} 1001}
1000 1002
@@ -1107,6 +1109,8 @@ packet_read_poll2(u_int32_t *seqnr_p)
1107 * return length of payload (without type field) 1109 * return length of payload (without type field)
1108 */ 1110 */
1109 type = buffer_get_char(&incoming_packet); 1111 type = buffer_get_char(&incoming_packet);
1112 if (type < SSH2_MSG_MIN || type >= SSH2_MSG_LOCAL_MIN)
1113 packet_disconnect("Invalid ssh2 packet type: %d", type);
1110 if (type == SSH2_MSG_NEWKEYS) 1114 if (type == SSH2_MSG_NEWKEYS)
1111 set_newkeys(MODE_IN); 1115 set_newkeys(MODE_IN);
1112#ifdef PACKET_DEBUG 1116#ifdef PACKET_DEBUG