From 83b3d99d2b47321b7ebb8db6f6ea04f3808bc069 Mon Sep 17 00:00:00 2001 From: "florian@openbsd.org" Date: Mon, 15 Oct 2018 11:28:50 +0000 Subject: [PATCH] upstream: struct sockaddr_storage is guaranteed to be large enough, no need to check the size. OK kn, deraadt OpenBSD-Commit-ID: 0aa56e92eb49c79f495b31a5093109ec5841f439 --- sshconnect.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sshconnect.c b/sshconnect.c index 6d819279e..52c328111 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -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 * Copyright (c) 1995 Tatu Ylonen , 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) {