summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorserg@serg.mylan <>2005-03-06 12:31:40 +0100
committerserg@serg.mylan <>2005-03-06 12:31:40 +0100
commit2b447eceb1e7e504da0127160c7041634619f2bf (patch)
treea1872a65e00a50f5c91ee6f18db410842b3f6bd8 /myisam
parent67846179fbd625d918ca910ee9766739da9a9214 (diff)
downloadmariadb-git-2b447eceb1e7e504da0127160c7041634619f2bf.tar.gz
myisam/ft_parser.c
protection against invalid string in ft_get_word mysys/my_symlink2.c typo fixed
Diffstat (limited to 'myisam')
-rw-r--r--myisam/ft_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 543cf998a82..0b1e68b0d70 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -103,7 +103,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
FT_WORD *word, FTB_PARAM *param)
{
byte *doc=*start;
- uint mwc, length;
+ uint mwc, length, mbl;
param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0);
param->plusminus=param->pmsign=0;
@@ -144,7 +144,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
}
mwc=length=0;
- for (word->pos=doc; doc<end; length++, doc+=my_mbcharlen(cs, *(uchar *)doc))
+ for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1))
if (true_word_char(cs,*doc))
mwc=0;
else if (!misc_word_char(*doc) || mwc++)