diff options
author | 2013-02-08 16:10:16 +0000 | |
---|---|---|
committer | 2013-02-08 16:10:16 +0000 | |
commit | 08324d276f48c53cc1af9cfe116a4c930bb77679 (patch) | |
tree | 3c2aec6142a66931af5f1da71eae54920375189e /pw/rm_r.c | |
parent | 08870ffbc9e2cee84244c234ad5b56ea9aa26fc1 (diff) | |
parent | cbfb9c649bd7eecce96516a347e4bab7c5b2cb52 (diff) | |
download | pw-darwin-08324d276f48c53cc1af9cfe116a4c930bb77679.tar.gz pw-darwin-08324d276f48c53cc1af9cfe116a4c930bb77679.tar.zst pw-darwin-08324d276f48c53cc1af9cfe116a4c930bb77679.zip |
Sync with HEAD.
Diffstat (limited to 'pw/rm_r.c')
-rw-r--r-- | pw/rm_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 */ |