=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.172 retrieving revision 1.172.2.1 diff -c -r1.172 -r1.172.2.1 *** src/usr.bin/ftp/fetch.c 2019/10/09 16:43:22 1.172 --- src/usr.bin/ftp/fetch.c 2019/12/19 16:50:22 1.172.2.1 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.172 2019/10/09 16:43:22 jca Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.172.2.1 2019/12/19 16:50:22 deraadt Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 242,247 **** --- 242,250 ---- #endif /* !NOSSL */ } else errx(1, "url_get: Invalid URL '%s'", newline); + + if (isfileurl && redirect_loop > 0) + errx(1, "Redirection to local file not permitted"); if (isfileurl) { path = host;