This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master
in repository gfs2-utils.
commit 7cff23e49b7a80486e522fee5a645cd9b143c7c3
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Sat May 23 15:05:43 2020 +0100
mkfs.gfs2: Fix strncpy warnings
New in gcc 10
warning: ‘__builtin_strncpy’ specified bound 64 equals destination size
[-Wstringop-truncation]
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/mkfs/main_mkfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index bb8762b..36fd08e 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -1144,8 +1144,8 @@ int main(int argc, char *argv[])
build_root(&sbd);
sb.sb_root_dir = sbd.md.rooti->i_di.di_num;
- strncpy(sb.sb_lockproto, opts.lockproto, GFS2_LOCKNAME_LEN);
- strncpy(sb.sb_locktable, opts.locktable, GFS2_LOCKNAME_LEN);
+ strncpy(sb.sb_lockproto, opts.lockproto, GFS2_LOCKNAME_LEN - 1);
+ strncpy(sb.sb_locktable, opts.locktable, GFS2_LOCKNAME_LEN - 1);
sb.sb_lockproto[GFS2_LOCKNAME_LEN - 1] = '\0';
sb.sb_locktable[GFS2_LOCKNAME_LEN - 1] = '\0';
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.