diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-22 14:16:59 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-22 14:16:59 +0000 |
commit | c8d7109f6036fab6b5993c24fc6514ba0c6a7d3d (patch) | |
tree | 8727ebde89003e052ad0c418eaf6ca61b96debc2 | |
parent | 00643ca5206c7000b6820b2274e01ffa5354ef19 (diff) | |
download | busybox-c8d7109f6036fab6b5993c24fc6514ba0c6a7d3d.tar.gz |
httpd: fix small bug in parser. it crept in during cleanup
-rw-r--r-- | networking/httpd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 794a39ea0..b8aa02fe4 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -100,7 +100,6 @@ # include <sys/sendfile.h> #endif -//#define DEBUG 1 #define DEBUG 0 #define IOBUF_SIZE 8192 /* IO buffer */ @@ -698,13 +697,13 @@ static void parse_conf(const char *path, int flag) unsigned file_len; /* note: path is "" unless we are in SUBDIR parse, - * otherwise it always starts with "/" */ + * otherwise it does NOT start with "/" */ cur = xzalloc(sizeof(*cur) /* includes space for NUL */ - + strlen(path) + + 1 + strlen(path) + strlen_buf ); /* form "/path/file" */ - sprintf(cur->before_colon, "%s%.*s", + sprintf(cur->before_colon, "/%s%.*s", path, after_colon - buf - 1, /* includes "/", but not ":" */ buf); |