summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-26 09:43:02 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-26 09:43:02 +0100
commita91c59c2affdebb4b34c2c8000b0b1648d43046d (patch)
tree052f54f48ddd4f177416213eda03f1a55e65dc70 /strings
parent319bcde937fa449d55a1b58ede05a8a50960c0ec (diff)
downloadmariadb-git-a91c59c2affdebb4b34c2c8000b0b1648d43046d.tar.gz
MDEV-5920 MySQL Bug#16765410 FTS: STACK AROUND THE VARIABLE 'MYSTR' WAS CORRUPTED IN INNOBASE_STRNXFRM
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-win1250ch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 244cfdc9b3c..27e6a94f67b 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -503,12 +503,12 @@ my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)),
if (!(flags & 0x0F)) /* All levels by default */
flags|= 0x0F;
- for (;;)
+ while (totlen < len)
{
NEXT_CMP_VALUE(src, p, pass, value, (int)srclen);
if (!value)
break;
- if (totlen <= len && ((1 << pass) & flags))
+ if ((1 << pass) & flags)
dest[totlen++] = value;
}
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen)