diff options
Diffstat (limited to 'usr.sbin/pw/rm_r.c')
-rw-r--r-- | usr.sbin/pw/rm_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/rm_r.c b/usr.sbin/pw/rm_r.c index 4ad590b..797ca9d 100644 --- a/usr.sbin/pw/rm_r.c +++ b/usr.sbin/pw/rm_r.c @@ -52,7 +52,7 @@ rm_r(char const * dir, uid_t uid) while ((e = readdir(d)) != NULL) { if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0) { - sprintf(file, "%s/%s", dir, e->d_name); + snprintf(file, sizeof(file), "%s/%s", dir, e->d_name); if (lstat(file, &st) == 0) { /* Need symlinks, not * linked file */ if (S_ISDIR(st.st_mode)) /* Directory - recurse */ |