=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.130 retrieving revision 1.131 diff -c -r1.130 -r1.131 *** src/usr.bin/ftp/fetch.c 2014/10/04 15:48:24 1.130 --- src/usr.bin/ftp/fetch.c 2014/10/06 11:47:25 1.131 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.130 2014/10/04 15:48:24 miod Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.131 2014/10/06 11:47:25 jca Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 343,354 **** } path = newline; - #ifndef SMALL - } else if (ishttpsurl) { - sslhost = strdup(host); - if (sslhost == NULL) - errx(1, "Can't allocate memory for https path/host."); - #endif /* !SMALL */ } if (isfileurl) { --- 343,348 ---- *************** *** 597,602 **** --- 591,601 ---- proxyurl = NULL; path = sslpath; } + if (sslhost == NULL) { + sslhost = strdup(host); + if (sslhost == NULL) + errx(1, "Can't allocate memory for https host."); + } if (ressl_init() != 0) { fprintf(ttyout, "SSL initialisation failed\n"); goto cleanup_url_get; *************** *** 610,616 **** ressl_error(ssl)); goto cleanup_url_get; } ! if (ressl_connect_socket(ssl, s, host) != 0) { fprintf(ttyout, "SSL failure: %s\n", ressl_error(ssl)); goto cleanup_url_get; } --- 609,615 ---- ressl_error(ssl)); goto cleanup_url_get; } ! if (ressl_connect_socket(ssl, s, sslhost) != 0) { fprintf(ttyout, "SSL failure: %s\n", ressl_error(ssl)); goto cleanup_url_get; }