Date: Tue, 12 Nov 2019 21:34:56 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 241929] sesutil --libxo fails to sanitize garbage data from the enclosures Message-ID: <bug-241929-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241929 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: bugs@FreeBSD.org Reporter: asomers@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=3D"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>=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF= =BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF= =BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD= =EF=BF=BD</description> </elements> ... </enclosures> </sesutil> Those mystery characters are all 0xFF bytes. sesutil needs to sanitize tho= se fields before it prints them. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241929-227>