Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/openssh/dist CID 1293655: Forward NULL d...



details:   https://anonhg.NetBSD.org/src/rev/1a2f8095e13c
branches:  trunk
changeset: 337393:1a2f8095e13c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Apr 13 18:00:47 2015 +0000

description:
CID 1293655: Forward NULL deref

diffstat:

 crypto/external/bsd/openssh/dist/serverloop.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r a138c15dc84e -r 1a2f8095e13c crypto/external/bsd/openssh/dist/serverloop.c
--- a/crypto/external/bsd/openssh/dist/serverloop.c     Mon Apr 13 17:59:21 2015 +0000
+++ b/crypto/external/bsd/openssh/dist/serverloop.c     Mon Apr 13 18:00:47 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: serverloop.c,v 1.11 2015/04/13 17:50:31 christos Exp $ */
+/*     $NetBSD: serverloop.c,v 1.12 2015/04/13 18:00:47 christos Exp $ */
 /* $OpenBSD: serverloop.c,v 1.178 2015/02/20 22:17:21 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo%cs.hut.fi@localhost>
@@ -37,7 +37,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: serverloop.c,v 1.11 2015/04/13 17:50:31 christos Exp $");
+__RCSID("$NetBSD: serverloop.c,v 1.12 2015/04/13 18:00:47 christos Exp $");
 #include <sys/param.h> /* MIN MAX */
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -863,8 +863,9 @@
                        if (packet_need_rekeying()) {
                                int r;
                                debug("need rekeying");
-                               active_state->kex->done = 0;
-                                if ((r = kex_send_kexinit(active_state)) != 0)
+                               if (active_state->kex)
+                                       active_state->kex->done = 0;
+                               if ((r = kex_send_kexinit(active_state)) != 0)
                                        logit("%s: kex_send_kexinit: %s",
                                            __func__, ssh_err(r));
                        }



Home | Main Index | Thread Index | Old Index