Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2016 16:52:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 209039] getextattr(8) -x garbles non-ASCII bytes
Message-ID:  <bug-209039-8@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209039

            Bug ID: 209039
           Summary: getextattr(8) -x garbles non-ASCII bytes
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

getextattr is used to print the value of an extended attribute on a file.  The
-x option prints the output in hex instead of ASCII.  It prints one byte at a
time, with spaces between bytes.  However, when printing bytes with the high
bit set, getextattr erroneously interprets the single byte as a signed 32-bit
number.

$ getextattr user umlauts foofoo     aeiou äëïöü
$ getextattr -x user umlauts foofoo     61 65 69 6f 75 20 ffffffc3 ffffffa4
ffffffc3 ffffffab ffffffc3 ffffffaf ffffffc3 ffffffb6 ffffffc3 ffffffbc

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

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