$OpenBSD$
--- dbg_mlc.c.orig	Fri Feb 17 20:38:53 2006
+++ dbg_mlc.c	Sun Sep  3 17:46:34 2006
@@ -724,14 +724,16 @@ GC_PTR p;
     int i;
 #endif
 {
+	size_t size;
     char *copy;
     if (str == NULL) return NULL;
-    copy = GC_debug_malloc_atomic(strlen(str) + 1, OPT_RA s, i);
+	size = strlen(str) + 1;
+    copy = GC_debug_malloc_atomic(size, OPT_RA s, i);
     if (copy == NULL) {
       errno = ENOMEM;
       return NULL;
     }
-    strcpy(copy, str);
+    strlcpy(copy, str, size);
     return copy;
 }
 
