summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKailasnath Nagarkar <kailasnath.nagarkar@oracle.com>2016-07-01 12:01:27 +0530
committerKailasnath Nagarkar <kailasnath.nagarkar@oracle.com>2016-07-01 12:01:27 +0530
commit07a33cdcef16b21c5d9bb5f0c538066e24eb8dc0 (patch)
tree9aada6d07e753037ba95016ab0330e512e44c76b /include
parent6986645c7924ef3292e233d9365520b29eb8fa0d (diff)
downloadmariadb-git-07a33cdcef16b21c5d9bb5f0c538066e24eb8dc0.tar.gz
Bug #23296299 : HANDLE_FATAL_SIGNAL (SIG=11) IN
MY_TOSORT_UTF32 This patch is specific for mysql-5.5 ISSUE: When a charater that is larger than possible to handle is passed to function my_tosort_utf32(), it results in segmentation fault. In the scenario mentioned in the bug AES_ENCRYPT function is used which returns large value. This value is further passed to my_tosort_utf32 function. This causes to cross array bound for array uni_plane, resulting in segment violation. SOLUTION: This issue has got addressed in 5.6 onward releases through worklog 2673. The fix is similar backport of that. Check for maximum character before accessing the array uni_plane. In addition to function my_tosort_utf32, the same potential problem is also present in functions my_tolower_utf16, my_toupper_utf16, my_tosort_utf16, my_tolower_utf32, my_toupper_utf32, my_tosort_unicode, my_tolower_utf8mb4 and my_toupper_utf8mb4. Fixed these functions as well.
Diffstat (limited to 'include')
-rw-r--r--include/m_ctype.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 81096f60c78..87b1e529f65 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,11 +33,11 @@ extern "C" {
#define MY_CS_TO_UPPER_TABLE_SIZE 256
#define MY_CS_SORT_ORDER_TABLE_SIZE 256
#define MY_CS_TO_UNI_TABLE_SIZE 256
-
#define CHARSET_DIR "charsets/"
#define my_wc_t ulong
+#define MY_CS_MAX_CHAR 0xFFFF
#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
/*