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

            Bug ID: 241929
           Summary: sesutil --libxo fails to sanitize garbage data from
                    the enclosures
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: b...@freebsd.org
          Reporter: asom...@freebsd.org

"sesutil --libxo" is awesome.  It's very easy to parse, but ONLY if the
enclosure's element descriptors are all valid UTF-8.  Unfortunately, we can't
rely on that.  If an element descriptor is not valid UTF-8, then the JSON or
XML output is not parseable.  Here's a real-world example:

$ sesutil map --libxo xml,pretty -u /dev/ses0
<sesutil version="1">
  <enclosures>
    <enc>ses0</enc>
    <name>SMC946 C1 0a01</name>
    ...
    <id>500304800924823f</id>
    <elements>
      <id>33</id>
      <type>Enclosure</type>
      <status>OK</status>
      <status_code>0x01 0x00 0x00 0x00</status_code>
      <description>��������������������������������</description>
    </elements>
    ...
  </enclosures>
</sesutil>

Those mystery characters are all 0xFF bytes.  sesutil needs to sanitize those
fields before it prints them.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to