diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2013-06-19 11:36:13 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2013-06-19 11:36:13 +0000 |
commit | 92ca6ea990f50c4c8bd3c485bcb54646a590f0ba (patch) | |
tree | fd105835d2f614bac3c24fd429fa3bea8f98ef8c /pw/rm_r.c | |
parent | 1d39c9328d1f55897e016da0574741cf289c9424 (diff) | |
parent | 6e958ef1b49b6a86d2c9a1fd68f98f9e84842aaa (diff) | |
download | pw-darwin-92ca6ea990f50c4c8bd3c485bcb54646a590f0ba.tar.gz pw-darwin-92ca6ea990f50c4c8bd3c485bcb54646a590f0ba.tar.zst pw-darwin-92ca6ea990f50c4c8bd3c485bcb54646a590f0ba.zip |
Merge fresh 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 */ |