diff options
author | maxim <maxim@FreeBSD.org> | 2006-10-18 08:22:33 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2006-10-18 08:22:33 +0000 |
commit | ebbb5a25446a11e6f835a8a2b9e280fa9be98ed2 (patch) | |
tree | 5a92ddf165b4dfa0a9deef6bf7da540c40c7d9b6 /bin/rm | |
parent | 4e5d9f4895d485312766872cf9a016dd3956db68 (diff) | |
download | FreeBSD-src-ebbb5a25446a11e6f835a8a2b9e280fa9be98ed2.zip FreeBSD-src-ebbb5a25446a11e6f835a8a2b9e280fa9be98ed2.tar.gz |
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
Diffstat (limited to 'bin/rm')
-rw-r--r-- | bin/rm/rm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 1ef6f38..7d02fa0 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. |