From a91c59c2affdebb4b34c2c8000b0b1648d43046d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 26 Mar 2014 09:43:02 +0100 Subject: MDEV-5920 MySQL Bug#16765410 FTS: STACK AROUND THE VARIABLE 'MYSTR' WAS CORRUPTED IN INNOBASE_STRNXFRM --- strings/ctype-win1250ch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'strings') 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) -- cgit v1.2.1