]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: struct sockaddr_storage is guaranteed to be large enough,
authorflorian@openbsd.org <florian@openbsd.org>
Mon, 15 Oct 2018 11:28:50 +0000 (11:28 +0000)
committerDamien Miller <djm@mindrot.org>
Sun, 21 Oct 2018 23:58:06 +0000 (10:58 +1100)
no need to check the size. OK kn, deraadt

OpenBSD-Commit-ID: 0aa56e92eb49c79f495b31a5093109ec5841f439

sshconnect.c

index 6d819279ee66eee8305ddf4f8693250daf742f6f..52c3281115d03cc5579fae16d8531e5bc5ad3431 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.305 2018/09/20 03:30:44 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.306 2018/10/15 11:28:50 florian Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -369,10 +369,6 @@ ssh_create_socket(struct addrinfo *ai)
                        error("getaddrinfo: no addrs");
                        goto fail;
                }
-               if (res->ai_addrlen > sizeof(bindaddr)) {
-                       error("%s: addr doesn't fit", __func__);
-                       goto fail;
-               }
                memcpy(&bindaddr, res->ai_addr, res->ai_addrlen);
                bindaddrlen = res->ai_addrlen;
        } else if (options.bind_interface != NULL) {