summaryrefslogtreecommitdiff
path: root/strings/ctype-utf8.c
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-07-05 14:41:04 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-07-05 14:41:04 +0300
commit5a496caeb579e4f0253388356863f36a7727f0ae (patch)
treed3241952f092c35a2f105cec61abaf2c6004983c /strings/ctype-utf8.c
parentfb3e11d0ab9317a73619d1e5c01669a7c6e034f9 (diff)
parent048577429f3adcb27100ace3dd6fd4579bcd9e53 (diff)
downloadmariadb-git-5a496caeb579e4f0253388356863f36a7727f0ae.tar.gz
merge
Diffstat (limited to 'strings/ctype-utf8.c')
-rw-r--r--strings/ctype-utf8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index e5e055e8962..234898e9796 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -4421,6 +4421,10 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)),
{
int code;
char hex[]= "0123456789abcdef";
+
+ if (s >= e)
+ return MY_CS_TOOSMALL;
+
if (wc < 128 && filename_safe_char[wc])
{
*s= (uchar) wc;