Changed strcpy() calls into strlcpy() calls, just to be extra safe.
[rsync/rsync.git] / lib / permstring.c
index 304b2a9..ba981ee 100644 (file)
@@ -30,7 +30,7 @@ void permstring(char *perms, mode_t mode)
        static const char *perm_map = "rwxrwxrwx";
        int i;
 
-       strcpy(perms, "----------");
+       strlcpy(perms, "----------", 11);
 
        for (i = 0; i < 9; i++) {
                if (mode & (1 << i))