diff options
author | unknown <serg@serg.mylan> | 2005-03-06 12:31:40 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-06 12:31:40 +0100 |
commit | 870059eb044d7b058e741de86eef3594100b5bda (patch) | |
tree | a1872a65e00a50f5c91ee6f18db410842b3f6bd8 /myisam | |
parent | a53fdc5e02135ac0a9c077d7c1ff984c695f6e5b (diff) | |
download | mariadb-git-870059eb044d7b058e741de86eef3594100b5bda.tar.gz |
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
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/ft_parser.c | 4 |
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++) |