Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 2010 03:49:18 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r202734 - head/usr.sbin/extattr
Message-ID:  <201001210349.o0L3nIBc008347@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001210349.o0L3nIBc008347>