]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Strip control codes in virBufferEscapeString
authorJán Tomko <jtomko@redhat.com>
Mon, 30 Mar 2015 10:41:40 +0000 (12:41 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 15 Apr 2015 16:41:20 +0000 (18:41 +0200)
commitaeb5262e4397528d582682471cb8075141189465
tree014a3007ad76ec7c973d511ccbb49328ef8239f4
parent60db2bc80fb5048b227c77c5138fe0e2c97e9c14
Strip control codes in virBufferEscapeString

These cannot be represented in XML.

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.

https://bugzilla.redhat.com/show_bug.cgi?id=1184131
https://bugzilla.redhat.com/show_bug.cgi?id=1066564
src/util/virbuffer.c
tests/virbuftest.c