From 6f1b80ead59c78e89c38920ebfac06e285cb38cd Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Tue, 4 Sep 2012 00:38:32 +0100 Subject: Fix MOTD string copy The missing terminating null character in the string copy meant that some of the previous message remained when the MOTD changed. diff --git a/src/interface.c b/src/interface.c index e2b1d0b..742272b 100644 --- a/src/interface.c +++ b/src/interface.c @@ -4977,7 +4977,7 @@ int search_results(char *str, int votes) } else if (!strncmp(str, "MOTD ", 5)) { - memcpy(server_motd, str+5, strlen(str+5)); + strncpy(server_motd, str+5, 511); } else if (!strncmp(str, "TAG ", 4)) { -- cgit v0.9.2-21-gd62e