summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flist.c2
-rw-r--r--loadparm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/flist.c b/flist.c
index 15c56c8e..4c2e984c 100644
--- a/flist.c
+++ b/flist.c
@@ -872,7 +872,7 @@ char *f_name(struct file_struct *f)
if (f->dirname) {
sprintf(p, "%s/%s", f->dirname, f->basename);
} else {
- strcpy(p, f->basename);
+ strlcpy(p, f->basename, MAXPATHLEN-1);
}
return p;
diff --git a/loadparm.c b/loadparm.c
index a66f5206..7fff24f0 100644
--- a/loadparm.c
+++ b/loadparm.c
@@ -52,7 +52,7 @@
#define strequal(a,b) (strcasecmp(a,b)==0)
#define BOOLSTR(b) ((b) ? "Yes" : "No")
typedef char pstring[1024];
-#define pstrcpy(a,b) strcpy(a,b)
+#define pstrcpy(a,b) strlcpy(a,b,sizeof(pstring)-1)
/* the following are used by loadparm for option lists */
typedef enum