diff options
author | Damien Miller <djm@mindrot.org> | 2009-02-14 16:35:01 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2009-02-14 16:35:01 +1100 |
commit | 61433bec808fc90de066902e793147fd5015a2cc (patch) | |
tree | ecd83691b3b24328a6c98d13c5838a3a26a4766e /packet.c | |
parent | e379e1083748ab84cc199f2cbf7029621e2cb75c (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) | |||
236 | static void | 236 | static void |
237 | packet_start_discard(Enc *enc, Mac *mac, u_int packet_length, u_int discard) | 237 | packet_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; |