mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
myisam/ft_parser.c
protection against invalid string in ft_get_word
mysys/my_symlink2.c
typo fixed
myisam/ft_parser.c:
protection against invalid string in ft_get_word
mysys/my_symlink2.c:
typo fixed
This commit is contained in:
parent
a53fdc5e02
commit
870059eb04
2 changed files with 3 additions and 3 deletions
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue