From 648805e437cb01d64287697d59f106497714607f Mon Sep 17 00:00:00 2001 From: jung Date: Mon, 26 Oct 2015 11:03:29 +0000 Subject: [PATCH] fix PATH_INFO for / requests diff from Denis Fondras ok reyk --- usr.sbin/httpd/httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/httpd/httpd.c b/usr.sbin/httpd/httpd.c index c755190095e..b9157abbe64 100644 --- a/usr.sbin/httpd/httpd.c +++ b/usr.sbin/httpd/httpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: httpd.c,v 1.41 2015/10/14 08:02:38 reyk Exp $ */ +/* $OpenBSD: httpd.c,v 1.42 2015/10/26 11:03:29 jung Exp $ */ /* * Copyright (c) 2014 Reyk Floeter @@ -696,7 +696,7 @@ path_info(char *path) for (p = end; p > start; p--) { /* Scan every path component from the end and at each '/' */ - if (p < end && *p != '/') + if (p <= end && *p != '/') continue; /* Temporarily cut the path component out */ -- 2.20.1