libDtHelp: 88550
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:38:14 +0000 (01:38 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:38:14 +0000 (01:38 +0100)
cde/lib/DtHelp/FileListUtils.c

index 5b522780d96c223d745acf7b946bf993ca12cfc7..727a4b15987f94ba525a5e7ab611a6ac78038f18 100644 (file)
@@ -237,8 +237,7 @@ static int ScanDirForFiles(
     if (pDir == NULL) return 0;                        /* RETURN */
 
     /* build the pathname */
-    strcpy (fullName, dirpath);
-    strcat (fullName, DirSlashStr);
+    snprintf(fullName, sizeof(fullName), "%s%s", dirpath, DirSlashStr);
     ptr = fullName + strlen (fullName);
 
     /*