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 Coverity fix:



details:   https://anonhg.NetBSD.org/src/rev/a6bc6711509d
branches:  trunk
changeset: 325075:a6bc6711509d
user:      spz <spz%NetBSD.org@localhost>
date:      Tue Dec 03 17:14:35 2013 +0000

description:
Coverity fix:
979928 Use after free
        debug3 line moved to before one of its arguments is freed

diffstat:

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

diffs (38 lines):

diff -r 0fa7c1a77470 -r a6bc6711509d crypto/external/bsd/openssh/dist/monitor.c
--- a/crypto/external/bsd/openssh/dist/monitor.c        Tue Dec 03 17:06:51 2013 +0000
+++ b/crypto/external/bsd/openssh/dist/monitor.c        Tue Dec 03 17:14:35 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: monitor.c,v 1.11 2013/11/08 19:18:25 christos Exp $    */
+/*     $NetBSD: monitor.c,v 1.12 2013/12/03 17:14:35 spz Exp $ */
 /* $OpenBSD: monitor.c,v 1.127 2013/07/19 07:37:48 markus Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include "includes.h"
-__RCSID("$NetBSD: monitor.c,v 1.11 2013/11/08 19:18:25 christos Exp $");
+__RCSID("$NetBSD: monitor.c,v 1.12 2013/12/03 17:14:35 spz Exp $");
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
@@ -1181,6 +1181,9 @@
                        break;
                }
        }
+       debug3("%s: key %p is %s",
+           __func__, key, allowed ? "allowed" : "not allowed");
+
        if (key != NULL)
                key_free(key);
 
@@ -1202,9 +1205,6 @@
                free(chost);
        }
 
-       debug3("%s: key %p is %s",
-           __func__, key, allowed ? "allowed" : "not allowed");
-
        buffer_clear(m);
        buffer_put_int(m, allowed);
        buffer_put_int(m, forced_command != NULL);



Home | Main Index | Thread Index | Old Index