
On 03/30/2015 05:02 AM, Ján Tomko wrote:
These cannot be represented in XML.
Yes they can, via entities. DV would know for sure, but I think that is the entity for the C byte '\1'.
We have been stripping them, but only if the string had characters that needed escaping: <>"'&
Extend the strcspn check to include control codes, and strip them even if we don't do any escaping.
NACK. Stripping control codes from a volume name represents the wrong name. We need to escape the problematic bytes, rather than strip them.
https://bugzilla.redhat.com/show_bug.cgi?id=1184131 https://bugzilla.redhat.com/show_bug.cgi?id=1066564 --- src/util/virbuffer.c | 14 +++++++++++--- tests/virbuftest.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 3 deletions(-)
As there are real bugs that will be fixed once we use the correct entities, I'm looking forward to v2. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org