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;
                        }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to