diff options
-rw-r--r-- | flist.c | 2 | ||||
-rw-r--r-- | loadparm.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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; @@ -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 |