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
This commit is contained in:
Daniel P. Berrange 2009-08-04 18:13:09 +01:00
parent bf69fd9b22
commit 8feb499ba2

View File

@ -304,7 +304,7 @@ virBufferEscapeString(const virBufferPtr buf, const char *format, const char *st
*out++ = 'o'; *out++ = 'o';
*out++ = 's'; *out++ = 's';
*out++ = ';'; *out++ = ';';
} else if ((*cur >= 0x20) || (*cur == '\n') || (*cur == '\t') || } else if (((unsigned char)*cur >= 0x20) || (*cur == '\n') || (*cur == '\t') ||
(*cur == '\r')) { (*cur == '\r')) {
/* /*
* default case, just copy ! * default case, just copy !