]> git.ipfire.org Git - thirdparty/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 17:43:24 +0000 (19:43 +0200)
commit7eb973eec193d553507a1b8379425367490f1341
tree6c026deaf327d05b99a0f6a0ca315b5ccf79f6db
parent5d1c041808a2496b1ff5c0914520d92982b4b37f
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
(cherry picked from commit aeb5262e4397528d582682471cb8075141189465)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Conflict:
  missing struct testBufAddStrData
src/util/virbuffer.c
tests/virbuftest.c