summaryrefslogtreecommitdiff
path: root/sql/debug_sync.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 09:10:03 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-09-03 09:10:03 +0300
commit2a93e632b1676b6df3dde150888d6428a57f8399 (patch)
treef9eac87b11d4e4666e50ac865aa82cac6f50a852 /sql/debug_sync.cc
parent9aea50616c2d8e067e5ce3efb1152e81877bf931 (diff)
parent94a520ddbe39ae97de1135d98699cf2674e6b77e (diff)
downloadmariadb-git-2a93e632b1676b6df3dde150888d6428a57f8399.tar.gz
Merge 10.1 into 10.2
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 e50ab0891ed..b1846bc48d5 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);
}