Files
libvirt/libvirt-0.6.2-buf-locale-escape.patch
Daniel P. Berrange 40a867daeb Misc important fixes from BZ
- Fix crash when attaching/detaching non-existant PCI device (rhbz #510907)
- Fix QEMU guest name/uuid uniqueness checks (rhbz #507405)
- Fix to use correct pci_add/del syntax for QEMU (rhbz #499669)
- Relabel disks before hotplugging them to guest (rhbz #496442)
- Correctly handle 8-bit high bytes when escaping XML (rhbz #479517)
2009-08-05 15:48:14 +00:00

25 lines
896 B
Diff

commit 8feb499ba2c3625632210c997b49f5df515c05d4
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Tue Aug 4 18:13:09 2009 +0100
Fix escaping of 8-bit high characters
Fix https://bugzilla.redhat.com/show_bug.cgi?id=479517
* src/buf.c: Cast to 'unsigned char' before doing compare to
avoid rejecting 8-bit high characters
diff --git a/src/buf.c b/src/buf.c
index 259175d..c802aa2 100644
--- a/src/buf.c
+++ b/src/buf.c
@@ -304,7 +304,7 @@ virBufferEscapeString(const virBufferPtr buf, const char *format, const char *st
*out++ = 'o';
*out++ = 's';
*out++ = ';';
- } else if ((*cur >= 0x20) || (*cur == '\n') || (*cur == '\t') ||
+ } else if (((unsigned char)*cur >= 0x20) || (*cur == '\n') || (*cur == '\t') ||
(*cur == '\r')) {
/*
* default case, just copy !