diff --git a/server.c b/server.c index 3dfbf83eb281cfb7cab85d15f865638eebab38a8..102bddcfcbfec2477e1ff91dac9865eeae5aea05 100644 --- a/server.c +++ b/server.c @@ -358,8 +358,6 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, } close(filefd); - print_buff(buff); - // move the trailing part backward int p1, p2; for (p1 = size - 1, p2 = p1 - added_length; p1 >= size - inset_index; @@ -387,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]; + char added[added_length + 1]; // create added string strcat(added, added_prefix);