aboutsummaryrefslogtreecommitdiff
path: root/bin/rm
diff options
context:
space:
mode:
authorMaxim Konovalov <maxim@FreeBSD.org>2006-10-18 08:22:33 +0000
committerMaxim Konovalov <maxim@FreeBSD.org>2006-10-18 08:22:33 +0000
commitcf1db7b34fa6b1c7c7720e6f49d00350b0a56fdc (patch)
tree5a92ddf165b4dfa0a9deef6bf7da540c40c7d9b6 /bin/rm
parente4c185db7aa8e34d99568ec23eaed06fe0edf4b8 (diff)
downloadsrc-cf1db7b34fa6b1c7c7720e6f49d00350b0a56fdc.tar.gz
src-cf1db7b34fa6b1c7c7720e6f49d00350b0a56fdc.zip
o Zero out struct stat before usage. lstat(2) can fail and
leave garbage there which will break -W code path. PR: bin/84569 Submitted by: Igor MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=163476
Diffstat (limited to 'bin/rm')
-rw-r--r--bin/rm/rm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 1ef6f385d303..7d02fa051c41 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -317,6 +317,7 @@ rm_file(char **argv)
int rval;
char *f;
+ bzero(&sb, sizeof(sb));
/*
* Remove a file. POSIX 1003.2 states that, by default, attempting
* to remove a directory is an error, so must always stat the file.