From: reyk Date: Sat, 26 Jul 2014 22:38:38 +0000 (+0000) Subject: Remove redundant slash X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a2e48e194d370713de24b0aa4212d42bf9b368c0;p=openbsd Remove redundant slash --- diff --git a/usr.sbin/httpd/server_file.c b/usr.sbin/httpd/server_file.c index 8031a8fc213..e19adb08da4 100644 --- a/usr.sbin/httpd/server_file.c +++ b/usr.sbin/httpd/server_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_file.c,v 1.16 2014/07/25 23:23:39 reyk Exp $ */ +/* $OpenBSD: server_file.c,v 1.17 2014/07/26 22:38:38 reyk Exp $ */ /* * Copyright (c) 2006 - 2014 Reyk Floeter @@ -123,7 +123,7 @@ server_file(struct httpd *env, struct client *clt) struct stat st; /* Request path is already canonicalized */ - if ((size_t)snprintf(path, sizeof(path), "%s/%s", + if ((size_t)snprintf(path, sizeof(path), "%s%s", srv_conf->docroot, desc->http_path) >= sizeof(path)) { /* Do not echo the uncanonicalized path */ server_abort_http(clt, 500, desc->http_path);