From d85168e40d12de12c119b98ea92c35f3c2fe1f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 7 Dec 2015 09:20:31 +0200 Subject: Correct length check in my_wc_mb_filename() --- strings/ctype-utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings') diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index edcac2774f8..2dd7f5e6b92 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -4585,7 +4585,7 @@ my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), } /* Non letter */ - if (s + 5 > e) + if (s + 4 > e) return MY_CS_TOOSMALL5; *s++= hex[(wc >> 12) & 15]; -- cgit v1.2.1 From fa25921b59aacdc6be050653f6cce17df12c6937 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Thu, 10 Dec 2015 11:22:53 +0100 Subject: MDEV-8407 Numeric errors, server crash with COLUMN_JSON() on DECIMAL with precision > 40 In fact it was error in decimal library (incorrect processing of buffer overflow) invisible from other server parts because of buffer allocation and precision tests. --- strings/decimal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'strings') diff --git a/strings/decimal.c b/strings/decimal.c index 07ccc537e47..8dbe1bd57f4 100644 --- a/strings/decimal.c +++ b/strings/decimal.c @@ -383,7 +383,8 @@ int decimal2string(const decimal_t *from, char *to, int *to_len, } else frac-=j; - len= from->sign + intg_len + test(frac) + frac_len; + frac_len= frac; + len= from->sign + intg_len + test(frac) + frac; } *to_len=len; s[len]=0; -- cgit v1.2.1 From af3c67056d3f9f7f348c612f9ce48e83c8a456d6 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 15 Dec 2015 10:57:28 +0400 Subject: MDEV-9265 SuSE patches: Suspicious implicit sign extension --- strings/ctype-ucs2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings') diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 593f9a12950..bd1e74becaa 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1932,7 +1932,7 @@ my_utf32_uni(CHARSET_INFO *cs __attribute__((unused)), { if (s + 4 > e) return MY_CS_TOOSMALL4; - *pwc= (s[0] << 24) + (s[1] << 16) + (s[2] << 8) + (s[3]); + *pwc= (((my_wc_t) s[0]) << 24) + (s[1] << 16) + (s[2] << 8) + (s[3]); return 4; } -- cgit v1.2.1