Lots of str[n]cat, str[n]cpy, and [v]sprintf have been replaced by strlcat, strlcpy...
[xonotic/darkplaces.git] / filematch.c
index ff24347..e3e35c8 100644 (file)
@@ -129,8 +129,8 @@ stringlist_t *listdirectory(char *path)
        struct _finddata_t n_file;
     long hFile;
        stringlist_t *start, *current;
-       strcpy(pattern, path);
-       strcat(pattern, "\\*");
+       strlcpy (pattern, path, sizeof (pattern));
+       strlcat (pattern, "\\*", sizeof (pattern));
        // ask for the directory listing handle
        hFile = _findfirst(pattern, &n_file);
        if(hFile != -1)