summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2014-07-28 12:47:14 +0400
committerAlexander Barkov <bar@mariadb.org>2014-07-28 12:47:14 +0400
commitc57c5be12a2d7d066cc508043da87cf51eb75cd3 (patch)
tree81ce5bfa4ad9ba30fb3235316f3a4a2da9013c83 /strings
parent01faff02fab4ca2fe2193fee5016bf3f24e9aea1 (diff)
downloadmariadb-git-c57c5be12a2d7d066cc508043da87cf51eb75cd3.tar.gz
MDEV-5745 analyze MySQL fix for bug#12368495
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 6e18635f94b..a79f5899ec5 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1983,10 +1983,10 @@ my_strnxfrmlen_utf32(CHARSET_INFO *cs __attribute__((unused)), size_t len)
static uint
my_ismbchar_utf32(CHARSET_INFO *cs __attribute__((unused)),
- const char *b __attribute__((unused)),
- const char *e __attribute__((unused)))
+ const char *b,
+ const char *e)
{
- return 4;
+ return b + 4 > e ? 0 : 4;
}
@@ -2895,10 +2895,10 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)),
static uint my_ismbchar_ucs2(CHARSET_INFO *cs __attribute__((unused)),
- const char *b __attribute__((unused)),
- const char *e __attribute__((unused)))
+ const char *b,
+ const char *e)
{
- return 2;
+ return b + 2 > e ? 0 : 2;
}