diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2009-02-13 11:50:22 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2009-02-13 11:50:22 +0000 |
commit | ed71446894eb16f342beb8f81af1c30cf995d611 (patch) | |
tree | e20339c84693fcd873f95c6d256ebc7bf4bdfbd2 | |
parent | c76c853e1a6f42ed34421af23200f44b81c9355a (diff) |
check for enc !=NULL in packet_start_discard
-rw-r--r-- | usr.bin/ssh/packet.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 26fefcc7f23..67f6ab38ff4 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.159 2009/01/26 09:58:15 markus Exp $ */ +/* $OpenBSD: packet.c,v 1.160 2009/02/13 11:50:21 markus Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -232,7 +232,7 @@ packet_stop_discard(void) static void packet_start_discard(Enc *enc, Mac *mac, u_int packet_length, u_int discard) { - if (!cipher_is_cbc(enc->cipher)) + if (enc == NULL || !cipher_is_cbc(enc->cipher)) packet_disconnect("Packet corrupt"); if (packet_length != PACKET_MAX_SIZE && mac && mac->enabled) packet_discard_mac = mac; |