summaryrefslogtreecommitdiff
path: root/strings
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
commit2d636e0e54f9eb08215a30114f59d374467646c6 (patch)
treed3241952f092c35a2f105cec61abaf2c6004983c /strings
parentde2d0a60daecc78303bb9368528a98add751eaf7 (diff)
parent4b498c9a53b48318d103bb44d756b9ca915d3101 (diff)
downloadmariadb-git-2d636e0e54f9eb08215a30114f59d374467646c6.tar.gz
merge
Diffstat (limited to 'strings')
-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;