From 91fdb1d9c2d84fc1c3b8420d74dc551c2a757398 Mon Sep 17 00:00:00 2001
From: ChouTatsumi <choutatsumi@gmail.com>
Date: Mon, 29 Apr 2019 22:11:54 +1000
Subject: [PATCH] test 22:11

---
 server.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/server.c b/server.c
index 47c0289..756cfef 100644
--- a/server.c
+++ b/server.c
@@ -389,6 +389,8 @@ bool show_start_page(int sockfd, char* username) {
 
     char added[added_length];
 
+    memset(word, 0, sizeof(word));
+
     // create added string
     strcat(added, added_prefix);
     strcat(added, username);
@@ -404,6 +406,8 @@ bool show_accepted_page(int sockfd) {
 
     char added[2049];
 
+    memset(word, 0, sizeof(word));
+
     strcat(added, added_prefix);
     printf("added is now %s", added);
 
@@ -423,7 +427,7 @@ bool show_accepted_page(int sockfd) {
     }
 
     printf("added is now %s", added);
-    
+
     strcat(added, added_suffix);
 
     printf("added is now %s", added);
-- 
GitLab