diff options
author | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-09-28 17:27:42 +0530 |
---|---|---|
committer | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-09-28 17:27:42 +0530 |
commit | 6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a (patch) | |
tree | 93d54c9fc71e2e76d1695cd5189bb8298c29d2e9 /strings | |
parent | a6987d9fb921a6638bb1a2397b89ca606fad6f49 (diff) | |
parent | 842616532a76cd078ba1d526ae4b85d3ad4be069 (diff) | |
download | mariadb-git-6cbbd6bd96a8b5c97ec4d0b687aac29fb0f63a6a.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-mb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index f2683726151..a890c147055 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2014, Oracle and/or its affiliates. - Copyright (c) 2009, 2014, SkySQL Ab. + Copyright (c) 2009, 2020, MariaDB Corporation. 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 @@ -407,7 +407,9 @@ my_copy_fix_mb(CHARSET_INFO *cs, src, src + src_length, nchars, status); DBUG_ASSERT(well_formed_nchars <= nchars); - memmove(dst, src, (well_formed_length= status->m_source_end_pos - src)); + well_formed_length= status->m_source_end_pos - src; + if (well_formed_length) + memmove(dst, src, well_formed_length); if (!status->m_well_formed_error_pos) return well_formed_length; |