mirror of https://github.com/BOINC/boinc.git
lib: fix xml_escape(), again
Commit ff0b8d0898
(fix CDATA escaping) introduced two bugs to xml_escape():
- it eats ']' characters that are not part of ']]>'
- it eats the next character after ']]>'
Fixes #2809
This commit is contained in:
parent
e72c05ace2
commit
5e23a9482c
|
@ -376,7 +376,9 @@ void xml_escape(const char* in, char* out, int len) {
|
|||
if (!strncmp(in, "]]>", 3)) {
|
||||
strcpy(p, "]]>");
|
||||
p += 6;
|
||||
in += 3;
|
||||
in += 2; // +1 from for loop
|
||||
} else {
|
||||
*p++ = x;
|
||||
}
|
||||
} else {
|
||||
*p++ = x;
|
||||
|
|
Loading…
Reference in New Issue