From caee15deeb8c7e8c122998ce9f0f1fd9b4950952 Mon Sep 17 00:00:00 2001 From: ChouTatsumi <choutatsumi@gmail.com> Date: Mon, 29 Apr 2019 21:19:56 +1000 Subject: [PATCH] test 21:19 --- server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.c b/server.c index 102bddc..2a7dd18 100644 --- a/server.c +++ b/server.c @@ -335,7 +335,7 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, int n; // the length needs to include the html tags for the username - int added_length = strlen(added); + int added_length = strlen(added) + 1; // get the size of the file struct stat st; @@ -385,7 +385,7 @@ bool show_start_page(int sockfd, char* username) { // the length needs to include the html tags for the username int added_length = username_length + 9; - char added[added_length + 1]; + char added[added_length]; // create added string strcat(added, added_prefix); -- GitLab