summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2009-02-14 16:35:01 +1100
committerDamien Miller <djm@mindrot.org>2009-02-14 16:35:01 +1100
commit61433bec808fc90de066902e793147fd5015a2cc (patch)
treeecd83691b3b24328a6c98d13c5838a3a26a4766e /packet.c
parente379e1083748ab84cc199f2cbf7029621e2cb75c (diff)
- markus@cvs.openbsd.org 2009/02/13 11:50:21
[packet.c] check for enc !=NULL in packet_start_discard
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet.c b/packet.c
index 33559cd4f..5afc84ce0 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.159 2009/01/26 09:58:15 markus Exp $ */ 1/* $OpenBSD: packet.c,v 1.160 2009/02/13 11:50:21 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -236,7 +236,7 @@ packet_stop_discard(void)
236static void 236static void
237packet_start_discard(Enc *enc, Mac *mac, u_int packet_length, u_int discard) 237packet_start_discard(Enc *enc, Mac *mac, u_int packet_length, u_int discard)
238{ 238{
239 if (!cipher_is_cbc(enc->cipher)) 239 if (enc == NULL || !cipher_is_cbc(enc->cipher))
240 packet_disconnect("Packet corrupt"); 240 packet_disconnect("Packet corrupt");
241 if (packet_length != PACKET_MAX_SIZE && mac && mac->enabled) 241 if (packet_length != PACKET_MAX_SIZE && mac && mac->enabled)
242 packet_discard_mac = mac; 242 packet_discard_mac = mac;