aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-22 14:16:59 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-22 14:16:59 +0000
commitc8d7109f6036fab6b5993c24fc6514ba0c6a7d3d (patch)
tree8727ebde89003e052ad0c418eaf6ca61b96debc2
parent00643ca5206c7000b6820b2274e01ffa5354ef19 (diff)
downloadbusybox-w32-c8d7109f6036fab6b5993c24fc6514ba0c6a7d3d.tar.gz
busybox-w32-c8d7109f6036fab6b5993c24fc6514ba0c6a7d3d.tar.bz2
busybox-w32-c8d7109f6036fab6b5993c24fc6514ba0c6a7d3d.zip
httpd: fix small bug in parser. it crept in during cleanup
-rw-r--r--networking/httpd.c7
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 @@
100# include <sys/sendfile.h> 100# include <sys/sendfile.h>
101#endif 101#endif
102 102
103//#define DEBUG 1
104#define DEBUG 0 103#define DEBUG 0
105 104
106#define IOBUF_SIZE 8192 /* IO buffer */ 105#define IOBUF_SIZE 8192 /* IO buffer */
@@ -698,13 +697,13 @@ static void parse_conf(const char *path, int flag)
698 unsigned file_len; 697 unsigned file_len;
699 698
700 /* note: path is "" unless we are in SUBDIR parse, 699 /* note: path is "" unless we are in SUBDIR parse,
701 * otherwise it always starts with "/" */ 700 * otherwise it does NOT start with "/" */
702 cur = xzalloc(sizeof(*cur) /* includes space for NUL */ 701 cur = xzalloc(sizeof(*cur) /* includes space for NUL */
703 + strlen(path) 702 + 1 + strlen(path)
704 + strlen_buf 703 + strlen_buf
705 ); 704 );
706 /* form "/path/file" */ 705 /* form "/path/file" */
707 sprintf(cur->before_colon, "%s%.*s", 706 sprintf(cur->before_colon, "/%s%.*s",
708 path, 707 path,
709 after_colon - buf - 1, /* includes "/", but not ":" */ 708 after_colon - buf - 1, /* includes "/", but not ":" */
710 buf); 709 buf);