aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--auth.c2
-rw-r--r--main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/auth.c b/auth.c
index b3ed872..b56e072 100644
--- a/auth.c
+++ b/auth.c
@@ -295,7 +295,7 @@ int auth_login(const struct auth *const a, const char *const user,
goto end;
}
- cJSON *u;
+ const cJSON *u;
cJSON_ArrayForEach(u, users)
{
diff --git a/main.c b/main.c
index 5175f00..690fcda 100644
--- a/main.c
+++ b/main.c
@@ -898,7 +898,7 @@ static int createdir(const struct http_payload *const p,
{
.status = HTTP_STATUS_BAD_REQUEST,
.buf.ro = body,
- .n = strlen(body)
+ .n = sizeof body - 1
};
if (http_response_add_header(r, "Content-Type", "text/html"))