diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-04 10:20:00 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-04 10:20:00 +0500 |
commit | db2d3104f90f398f81f5ab8fd7465f67cb950cce (patch) | |
tree | e47d7238dc0f1a553b33aec326c1494de7a91bf6 /strings/ctype-euc_kr.c | |
parent | 7a2bb241bd0a80303385ef251ccb422c99c33a0b (diff) | |
download | mariadb-git-db2d3104f90f398f81f5ab8fd7465f67cb950cce.tar.gz |
Fix for bug #31069: crash in 'sounds like'
and for bug #31070: crash during conversion of charsets
Problem: passing a 0 byte length string to some my_mb_wc_XXX()
functions leads to server crash due to improper argument check.
Fix: properly check arguments passed to my_mb_wc_XXX() functions.
mysql-test/include/ctype_common.inc:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test case.
mysql-test/r/ctype_big5.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_euckr.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_gb2312.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_gbk.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
mysql-test/r/ctype_uca.result:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- test result.
strings/ctype-big5.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-cp932.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-euc_kr.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-gb2312.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
strings/ctype-sjis.c:
Fix for bug #31069: crash in 'sounds like'
and bug #31070: crash during conversion of charsets
- check the string length before testing its first byte.
Diffstat (limited to 'strings/ctype-euc_kr.c')
-rw-r--r-- | strings/ctype-euc_kr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 25ac416ac60..50300f3c140 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8614,12 +8614,12 @@ my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { - int hi=s[0]; + int hi; if (s >= e) return MY_CS_TOOSMALL; - if (hi<0x80) + if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; |