[packet.c]
     check for enc !=NULL in packet_start_discard
This commit is contained in:
Damien Miller 2009-02-14 16:35:01 +11:00
parent e379e10837
commit 61433bec80
2 changed files with 6 additions and 3 deletions

View File

@ -30,6 +30,9 @@
- jmc@cvs.openbsd.org 2009/02/12 07:34:20
[ssh_config.5]
kill trailing whitespace;
- markus@cvs.openbsd.org 2009/02/13 11:50:21
[packet.c]
check for enc !=NULL in packet_start_discard
20090212
- (djm) [sshpty.c] bz#1419: OSX uses cloning ptys that automagically
@ -5156,5 +5159,5 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.5193 2009/02/14 05:34:39 djm Exp $
$Id: ChangeLog,v 1.5194 2009/02/14 05:35:01 djm Exp $

View File

@ -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
@ -236,7 +236,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;