From 6bf05cf1ff3debbab2bcc482dffb821aa458177b Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 7 May 2008 12:18:48 +0000 Subject: httpd: fix several bugs triggering by realtive path in -h DIR. function old new delta handle_incoming_and_exit 2657 2659 +2 send_cgi_and_exit 869 862 -7 parse_conf 1647 1626 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-28) Total: -26 bytes --- libbb/concat_path_file.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libbb/concat_path_file.c') diff --git a/libbb/concat_path_file.c b/libbb/concat_path_file.c index 9aae601a4..dd6909fc2 100644 --- a/libbb/concat_path_file.c +++ b/libbb/concat_path_file.c @@ -8,9 +8,11 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -/* concatenate path and file name to new allocation buffer, - * not adding '/' if path name already has '/' -*/ +/* Concatenate path and filename to new allocated buffer. + * Add '/' only as needed (no duplicate // are produced). + * If path is NULL, it is assumed to be "/". + * filename should not be NULL. + */ #include "libbb.h" -- cgit v1.2.3