summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorSujatha <sujatha.sivakumar@mariadb.com>2020-09-29 16:59:36 +0530
committerSujatha <sujatha.sivakumar@mariadb.com>2020-09-29 16:59:36 +0530
commit25ede13611b3c1f736be22fc581a0c371d212f61 (patch)
tree0a930e742c1f80786b573067bfed9014c8c54ce8 /strings
parent080522dcd7177a0008824802cd58a36ee8048d8f (diff)
parent79e32e47a11150839ac4ab44ac02d4019c0e0019 (diff)
downloadmariadb-git-25ede13611b3c1f736be22fc581a0c371d212f61.tar.gz
Merge branch '10.4' into 10.5
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-mb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index e7a218bdc47..b84c91efe5f 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -406,7 +406,9 @@ my_copy_fix_mb(CHARSET_INFO *cs,
well_formed_nchars= my_ci_well_formed_char_length(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;