svn commit: r208004 - head/usr.sbin/extattr
Zachary Loafman
zml at FreeBSD.org
Wed May 12 21:25:05 UTC 2010
Author: zml
Date: Wed May 12 21:25:05 2010
New Revision: 208004
URL: http://svn.freebsd.org/changeset/base/208004
Log:
extattr: Fix a signed/unsigned issue
Submitted by: Matthew Fleming <matthew.fleming at isilon.com>
Reviewed by: zml, dfr
Modified:
head/usr.sbin/extattr/rmextattr.c
Modified: head/usr.sbin/extattr/rmextattr.c
==============================================================================
--- head/usr.sbin/extattr/rmextattr.c Wed May 12 21:24:46 2010 (r208003)
+++ head/usr.sbin/extattr/rmextattr.c Wed May 12 21:25:05 2010 (r208004)
@@ -231,9 +231,12 @@ main(int argc, char *argv[])
break;
if (!flag_quiet)
printf("%s\t", argv[arg_counter]);
- for (i = 0; i < error; i += buf[i] + 1)
+ for (i = 0; i < error; i += ch + 1) {
+ /* The attribute name length is unsigned. */
+ ch = (unsigned char)buf[i];
printf("%s%*.*s", i ? "\t" : "",
- buf[i], buf[i], buf + i + 1);
+ ch, ch, buf + i + 1);
+ }
printf("\n");
continue;
case EAGET:
More information about the svn-src-head
mailing list