closedir(d);
return;
}
- strcat(fname,"/");
+ strlcat(fname,"/", MAXPATHLEN-1);
l++;
}
p = fname + strlen(fname);
l = strlen(fname);
if (l != 1 && fname[l-1] == '/') {
- strcat(fname,".");
+ strlcat(fname,".",MAXPATHLEN-1);
}
if (link_stat(fname,&st) != 0) {
thus getting their permissions right */
*p = 0;
if (strcmp(lastpath,fname)) {
- strcpy(lastpath, fname);
+ strlcpy(lastpath, fname, sizeof(lastpath)-1);
*p = '/';
for (p=fname+1; (p=strchr(p,'/')); p++) {
*p = 0;
n = (n+1)%10;
if (f->dirname) {
- sprintf(p, "%s/%s", f->dirname, f->basename);
+ slprintf(p, MAXPATHLEN-1, "%s/%s", f->dirname, f->basename);
} else {
strlcpy(p, f->basename, MAXPATHLEN-1);
}