diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-01-21 03:49:18 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-01-21 03:49:18 +0000 |
commit | b1a6e45406add6a0bbc1f7275bf3a065a5315a7f (patch) | |
tree | 39439fedba80c187b720cc859f1ae79d57b91d46 /usr.sbin/extattr | |
parent | 92755e4d60b98447fbb74284fad12d6edbf24108 (diff) | |
download | FreeBSD-src-b1a6e45406add6a0bbc1f7275bf3a065a5315a7f.zip FreeBSD-src-b1a6e45406add6a0bbc1f7275bf3a065a5315a7f.tar.gz |
Fix a bug when printing attributes from multiple files: buflen could be
longer than the length of the current attribute if the buffer were reused
and previously longer, so bits of the previous, longer attribute would be
written. Fix this by using the actual attribute length.
Diffstat (limited to 'usr.sbin/extattr')
-rw-r--r-- | usr.sbin/extattr/rmextattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/extattr/rmextattr.c b/usr.sbin/extattr/rmextattr.c index 2b2689b..7ed92b6 100644 --- a/usr.sbin/extattr/rmextattr.c +++ b/usr.sbin/extattr/rmextattr.c @@ -269,7 +269,7 @@ main(int argc, char *argv[]) printf("\n"); continue; } else { - fwrite(buf, buflen, 1, stdout); + fwrite(buf, error, 1, stdout); printf("\n"); continue; } |