[vlc-commits] Avoid char conversion in strchr() - should fix #6266
Rémi Denis-Courmont
git at videolan.org
Fri Mar 2 17:45:35 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 2 18:44:35 2012 +0200| [d843a2fc47bf6b9f4277310736b25caee8309ee7] | committer: Rémi Denis-Courmont
Avoid char conversion in strchr() - should fix #6266
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d843a2fc47bf6b9f4277310736b25caee8309ee7
---
src/text/strings.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/text/strings.c b/src/text/strings.c
index 17cddab..7b709df 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -422,7 +422,7 @@ char *convert_xml_special_chars (const char *str)
}
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);
else
switch (cp)
More information about the vlc-commits
mailing list