diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-11-10 17:51:13 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-11-10 17:51:13 +0100 |
commit | f3c63615d88a27fe6bb8e6201b4f3f542acf6d6f (patch) | |
tree | 4e528e300b8aed0ae7d70298d96d821e60630ed8 /mysys/my_lib.c | |
parent | 1c6394e503876473a5c7b1fe15bb6884766b2f75 (diff) | |
download | mariadb-git-f3c63615d88a27fe6bb8e6201b4f3f542acf6d6f.tar.gz |
MDEV-4734 Adding ending / to a directory can fail when the directory ends with 0
+1 typo fixed
Diffstat (limited to 'mysys/my_lib.c')
-rw-r--r-- | mysys/my_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c index e8a81b19e22..a8f7c02ab63 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -98,8 +98,8 @@ static char *directory_file_name (char * dst, const char *src) if (src[0] == 0) src= (char*) "."; /* Use empty as current */ - end=strmov(dst, src); - if (end[-1] != FN_LIBCHAR + 1) + end= strnmov(dst, src, FN_REFLEN + 1); + if (end[-1] != FN_LIBCHAR) { *end++= FN_LIBCHAR; /* Add last '/' */ *end='\0'; |