svn commit: r202734 - head/usr.sbin/extattr
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Thu Jan 21 03:49:18 UTC 2010
Author: nwhitehorn
Date: Thu Jan 21 03:49:18 2010
New Revision: 202734
URL: http://svn.freebsd.org/changeset/base/202734
Log:
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.
Modified:
head/usr.sbin/extattr/rmextattr.c
Modified: head/usr.sbin/extattr/rmextattr.c
==============================================================================
--- head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:06:52 2010 (r202733)
+++ head/usr.sbin/extattr/rmextattr.c Thu Jan 21 03:49:18 2010 (r202734)
@@ -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;
}
More information about the svn-src-head
mailing list