diff --git a/log/src/log.c b/log/src/log.c
index 29c5e5027d27d96b7ce5c09dd321142f390eae11..263d79a6cb511ce8db161105151d9c42f9a71444 100644
--- a/log/src/log.c
+++ b/log/src/log.c
@@ -5984,17 +5984,17 @@ static void centercommand()
 /*=                                              =*/
 /*================================================*/
 
-static int comparestr(char *s_, short g, char *t_)
+static int comparestr(char *s_, uchar g, char *t_)
 {
 	int Result;
-	char s[9], t[9];
+	char *s, *t;
 	char ch;
 	short i;
 	int match;
 	short FORLIM;
 
-	strcpy(s, s_);
-	strcpy(t, t_);
+	s = s_;
+	t = t_;
 	if (*t == '\0' || !strcmp(s, t))
 	{
 		return (strcmp(s, t) == 0);
@@ -6004,12 +6004,12 @@ static int comparestr(char *s_, short g, char *t_)
 		ch = t[0];
 		if (ch == '*' || ch == '?' || ch == '=')
 		{
-			strcpy_overlap(t, t + 1);
+			t++;
 			do
 			{
 				match = comparestr(s, g, t);
 				if (!match && *s != '\0')
-					strcpy_overlap(s, s + 1);
+					s++;
 			} while (!(match || *s == '\0'));
 			return (match || comparestr(s, g, t));
 		}
@@ -6028,8 +6028,8 @@ static int comparestr(char *s_, short g, char *t_)
 		}
 		else if (*s != '\0' && (ch == '%' || ch == s[0]))
 		{
-			strcpy_overlap(s, s + 1);
-			strcpy_overlap(t, t + 1);
+			s++;
+			t++;
 			return (comparestr(s, g, t));
 		}
 		else