summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-10-27 09:01:13 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-10-28 22:58:12 -0400
commitb27f1c0910379e8be7e23818d2dbdeb650a7d743 (patch)
tree8c6d5ed327745bcff83ae1b5b0bcf1f6a832e2ee
parent16c4530e614b6edbfb840e0aae320908079e38f7 (diff)
downloadlighttpd1.4-b27f1c0910379e8be7e23818d2dbdeb650a7d743.tar.gz
lighttpd1.4-b27f1c0910379e8be7e23818d2dbdeb650a7d743.zip
[core] fix var.CWD (regression in 1.4.46) (fixes #2835)
(broken in commit:86bb8be2) x-ref: "empty var.CWD" https://redmine.lighttpd.net/issues/2835
-rw-r--r--src/configfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/configfile.c b/src/configfile.c
index 064039b1..5333e0a3 100644
--- a/src/configfile.c
+++ b/src/configfile.c
@@ -1355,7 +1355,7 @@ int config_read(server *srv, const char *fn) {
dcwd = data_string_init();
buffer_string_prepare_copy(dcwd->value, 1023);
if (NULL != getcwd(dcwd->value->ptr, dcwd->value->size - 1)) {
- buffer_commit(dcwd->value, buffer_string_length(dcwd->value));
+ buffer_commit(dcwd->value, strlen(dcwd->value->ptr));
buffer_copy_string_len(dcwd->key, CONST_STR_LEN("var.CWD"));
array_insert_unique(dc->value, (data_unset *)dcwd);
} else {