summaryrefslogtreecommitdiff
path: root/sql/debug_sync.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 09:26:54 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 09:26:54 +0300
commitc3752cef3c34589ea95a7ab66cff3dd5b11290d5 (patch)
treec7b8eb21dedd3139dacf2c0a12bed6e362afa1d9 /sql/debug_sync.cc
parent56ae0adee35c1bc053711a8579857e6b0301eb80 (diff)
parent2a93e632b1676b6df3dde150888d6428a57f8399 (diff)
downloadmariadb-git-c3752cef3c34589ea95a7ab66cff3dd5b11290d5.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/debug_sync.cc')
-rw-r--r--sql/debug_sync.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/debug_sync.cc b/sql/debug_sync.cc
index 39ceaadc671..c037af40e33 100644
--- a/sql/debug_sync.cc
+++ b/sql/debug_sync.cc
@@ -1,4 +1,5 @@
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2020, MariaDB
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
@@ -319,7 +320,8 @@ static char *debug_sync_bmove_len(char *to, char *to_end,
DBUG_ASSERT(to_end);
DBUG_ASSERT(!length || from);
set_if_smaller(length, (size_t) (to_end - to));
- memcpy(to, from, length);
+ if (length)
+ memcpy(to, from, length);
return (to + length);
}