Commit 8a99cd63 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid char conversion in strchr() - fixes #6266

(cherry picked from commit d843a2fc)
parent f4aaab56
...@@ -422,7 +422,7 @@ char *convert_xml_special_chars (const char *str) ...@@ -422,7 +422,7 @@ char *convert_xml_special_chars (const char *str)
} }
if ((cp & ~0x0080) < 32 /* C0/C1 control codes */ if ((cp & ~0x0080) < 32 /* C0/C1 control codes */
&& strchr ("\x09\x0A\x0D\x85", cp) == NULL) && memchr ("\x09\x0A\x0D\x85", cp, 4) == NULL)
ptr += sprintf (ptr, "&#%"PRIu32";", cp); ptr += sprintf (ptr, "&#%"PRIu32";", cp);
else else
switch (cp) switch (cp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment