summaryrefslogtreecommitdiff
path: root/strings/ctype-ucs2.c
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-05-07 19:20:17 +0400
committerAlexander Barkov <bar@mariadb.com>2020-05-09 16:01:30 +0400
commitcfe5ee90c8e4b9dfa98a41fcd299197a59261be7 (patch)
tree35fdaabac55d4b36d228bc9600112e986850b162 /strings/ctype-ucs2.c
parentc675886dcdecd29571bd08605a409325ee81004c (diff)
downloadmariadb-git-cfe5ee90c8e4b9dfa98a41fcd299197a59261be7.tar.gz
MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
The code did not take into account that: - U+005C (backslash) can occupy more than mbminlen characters (e.g. in sjis) - Some character sets do not have a code for U+005C (e.g. swe7) Adding a new function my_wc_to_printable into MY_CHARSET_HANDLER to cover all special cases easier.
Diffstat (limited to 'strings/ctype-ucs2.c')
-rw-r--r--strings/ctype-ucs2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index e4234a9582a..d764849c01e 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1591,6 +1591,7 @@ MY_CHARSET_HANDLER my_charset_utf16_handler=
my_well_formed_char_length_utf16,
my_copy_fix_mb2_or_mb4,
my_uni_utf16,
+ my_wc_to_printable_generic
};
@@ -1931,6 +1932,7 @@ static MY_CHARSET_HANDLER my_charset_utf16le_handler=
my_well_formed_char_length_utf16,
my_copy_fix_mb2_or_mb4,
my_uni_utf16le,
+ my_wc_to_printable_generic
};
@@ -2753,6 +2755,7 @@ MY_CHARSET_HANDLER my_charset_utf32_handler=
my_well_formed_char_length_utf32,
my_copy_fix_mb2_or_mb4,
my_uni_utf32,
+ my_wc_to_printable_generic
};
@@ -3343,6 +3346,7 @@ MY_CHARSET_HANDLER my_charset_ucs2_handler=
my_well_formed_char_length_ucs2,
my_copy_fix_mb2_or_mb4,
my_uni_ucs2,
+ my_wc_to_printable_generic
};