diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-03-07 19:17:37 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-03-10 18:21:29 +0100 |
commit | 5d40ed864eb91314c894c713cd0d3d03c62ec8c5 (patch) | |
tree | 597eab3f29343ffb834b8a9f4e5a54f4be56212d /strings | |
parent | e0a03ca30aa6f91daf7ea519a57d85e54dc49927 (diff) | |
download | mariadb-git-5d40ed864eb91314c894c713cd0d3d03c62ec8c5.tar.gz |
MDEV-11752 Unsafe strmov - function definition in include/m_string.h
assert that strmov() cannot be used on overlapping strings.
(because strpcpy cannot)
Diffstat (limited to 'strings')
-rw-r--r-- | strings/strmov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/strings/strmov.c b/strings/strmov.c index b38d5db5d6e..0f594185688 100644 --- a/strings/strmov.c +++ b/strings/strmov.c @@ -40,6 +40,7 @@ char *strmov(register char *dst, register const char *src) { + DBUG_ASSERT(src + strlen(src) < dst || dst + strlen(src) < src); while ((*dst++ = *src++)) ; return dst-1; } |