From ed71446894eb16f342beb8f81af1c30cf995d611 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Fri, 13 Feb 2009 11:50:22 +0000 Subject: check for enc !=NULL in packet_start_discard --- usr.bin/ssh/packet.c | 4 ++-- 1 file 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 * Copyright (c) 1995 Tatu Ylonen , 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; -- cgit v1.2.3