aboutsummaryrefslogtreecommitdiff
path: root/wiki.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiki.c')
-rw-r--r--wiki.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiki.c b/wiki.c
index 5f3af7e..cd92564 100644
--- a/wiki.c
+++ b/wiki.c
@@ -138,7 +138,7 @@ int store(char *raw, int len) {
int pos = 0;
unsigned int decoded;
- char buffer[3];
+ char buffer[3] = { 0 };
for(int i = 0; i < len; i++) {
buffer[pos] = getchar();
if(buffer[pos] == '+') buffer[pos] = ' ';
@@ -281,7 +281,7 @@ int main(int argc, char **argv) {
setenv("MARXUP_PREFIX", base, 1);
setenv("MARXUP_WIKI", "1", 1);
- if(chdir("pages"))
+ if(chdir(pages))
return problem(503, "Service unavailable");
if(!strncmp(verb, "POST", 4)) return post(page);