From 9fdb3b5bd4b43d8426eccf5d7374d0bc537da8da Mon Sep 17 00:00:00 2001 From: ChouTatsumi <choutatsumi@gmail.com> Date: Mon, 29 Apr 2019 19:19:12 +1000 Subject: [PATCH] test 19:19 --- server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.c b/server.c index 27fe4e8..3a27814 100644 --- a/server.c +++ b/server.c @@ -384,17 +384,15 @@ bool show_start_page(int sockfd, char* username) { // the length needs to include the html tags for the username long added_length = username_length + 9; - char added[added_length + 1]; + char added[2048]; // create added string strncpy(added, added_prefix, added_prefix_length); printf("added is now %s\r\n", added); - strncpy(added + added_prefix_length, username, username_length); printf("added is now %s\r\n", added); strncpy(added + added_prefix_length + username_length, added_suffix, added_suffix_length); - printf("added is now %s\r\n", added); return show_modified_page(sockfd, START_PAGE, added, 212); -- GitLab