summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2019-06-02 13:53:16 +0300
committerMonty <monty@mariadb.org>2019-06-03 15:06:51 +0300
commit05f8120d0ebaccba6c8dbad1124592315bd1f355 (patch)
tree96ac659778d0be777dee4a9ea4d33b1689e9330a /extra
parent76f14be10f5e6cebf44a93e48673930fdeb50442 (diff)
downloadmariadb-git-05f8120d0ebaccba6c8dbad1124592315bd1f355.tar.gz
Fixed compiler warning
Wrong compiler warning from GCC: ‘snprintf’ output 2 or more bytes (assuming 4001) into a destination of size 4000
Diffstat (limited to 'extra')
-rw-r--r--extra/mariabackup/xtrabackup.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 3d5e8a690a4..4163fd1d210 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -5235,7 +5235,11 @@ next_file_item_1:
goto next_datadir_item;
}
- snprintf(dbpath, sizeof(dbpath), "%s/%s", path, dbinfo.name);
+ snprintf(dbpath, sizeof(dbpath), "%.*s/%.*s",
+ OS_FILE_MAX_PATH/2-1,
+ path,
+ OS_FILE_MAX_PATH/2-1,
+ dbinfo.name);
os_normalize_path(dbpath);