From 4c3f1baca99b437c071a2a2a43fd4ee1f36d2afe Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 25 Apr 2003 16:27:16 +0500 Subject: [PATCH] ctype-tis620.c: Don't allow access outside the string --- strings/ctype-tis620.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index d5181dc4db0..7628b425b65 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -492,7 +492,7 @@ static uchar* thai2sortable(const uchar * tstr,uint len) } pLeft4 = pRight4;*/ while(len--) { - if(isldvowel(*p) && isconsnt(p[1])) { + if(isldvowel(*p) && len > 0 && isconsnt(p[1])) { *pRight1++ = t_ctype[p[1]][0]; *pRight2++ = t_ctype[p[1]][1]; *pRight3++ = t_ctype[p[1]][2];