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 --- include/libbb.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index dfcc96d5b..281152f5f 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -938,6 +938,10 @@ int bb_ask_confirmation(void); extern int bb_parse_mode(const char* s, mode_t* theMode); +/* 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. */ char *concat_path_file(const char *path, const char *filename); char *concat_subpath_file(const char *path, const char *filename); const char *bb_basename(const char *name); -- cgit v1.2.3