diff options
author | Felipe Pena <felipe@php.net> | 2008-04-11 19:06:12 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-04-11 19:06:12 +0000 |
commit | fce4f9600e099cb782d0d352f0f9836cc581ac26 (patch) | |
tree | 01bf846ce4122e441b314a95f8f128833a26d455 /ext/standard/html.c | |
parent | ae3295e1b93d342f201dcbadfa1b9e748539e0bd (diff) | |
download | php-git-fce4f9600e099cb782d0d352f0f9836cc581ac26.tar.gz |
MFB: Fixed bug #44703 (htmlspecialchars() does not detect bad character set argument)
Diffstat (limited to 'ext/standard/html.c')
-rw-r--r-- | ext/standard/html.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c index 3ecd57e7ae..2d41691265 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -842,7 +842,7 @@ det_charset: /* now walk the charset map and look for the codeset */ for (i = 0; charset_map[i].codeset; i++) { - if (strncasecmp(charset_hint, charset_map[i].codeset, len) == 0) { + if (len == strlen(charset_map[i].codeset) && strncasecmp(charset_hint, charset_map[i].codeset, len) == 0) { charset = charset_map[i].charset; found = 1; break; |