]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- djm@cvs.openbsd.org 2013/10/25 23:04:51
authorDamien Miller <djm@mindrot.org>
Fri, 25 Oct 2013 23:07:56 +0000 (10:07 +1100)
committerDamien Miller <djm@mindrot.org>
Fri, 25 Oct 2013 23:07:56 +0000 (10:07 +1100)
     [ssh.c]
     fix crash when using ProxyCommand caused by previous commit - was calling
     freeaddrinfo(NULL); spotted by sthen@ and Tim Ruehsen, patch by sthen@

ChangeLog
ssh.c

index d32065913ec4e11eb1c3bc0505b4216ff7b883f3..4519a922e1203a544a96b818f26b2349d2856514 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+20131026
+ - (djm) OpenBSD CVS Sync
+   - djm@cvs.openbsd.org 2013/10/25 23:04:51
+     [ssh.c]
+     fix crash when using ProxyCommand caused by previous commit - was calling
+     freeaddrinfo(NULL); spotted by sthen@ and Tim Ruehsen, patch by sthen@
+
 20131025
  - (djm) [ssh-keygen.c ssh-keysign.c sshconnect1.c sshd.c] Remove
    unnecessary arc4random_stir() calls. The only ones left are to ensure
diff --git a/ssh.c b/ssh.c
index 81921a10dc148cc4fd8c14d99fade3fc65a77e85..ef94591b1fed0785f4f0b73cc7eea19cd4844e49 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.390 2013/10/24 08:19:36 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.391 2013/10/25 23:04:51 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -965,7 +965,9 @@ main(int ac, char **av)
            options.use_privileged_port) != 0)
                exit(255);
 
-       freeaddrinfo(addrs);
+       if (addrs != NULL)
+               freeaddrinfo(addrs);
+
        packet_set_timeout(options.server_alive_interval,
            options.server_alive_count_max);