]> sourceware.org Git - lvm2.git/commitdiff
gcc: ensure buffer ends with 0
authorZdenek Kabelac <zkabelac@redhat.com>
Thu, 18 Mar 2021 22:08:08 +0000 (23:08 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 19 Mar 2021 22:21:18 +0000 (23:21 +0100)
lib/commands/toolcontext.c

index 92008a641bc79028b17a2111e5c5f14e7499ea85..75634caff34f90ab838b5c64d67d42e3c9b87e82 100644 (file)
@@ -230,7 +230,7 @@ static void _get_sysfs_dir(struct cmd_context *cmd, char *buf, size_t buf_size)
                return;
        }
 
-       strncpy(buf, sys_mnt, buf_size);
+       (void) dm_strncpy(buf, sys_mnt, buf_size);
 }
 
 static uint32_t _parse_debug_fields(struct cmd_context *cmd, int cfg, const char *cfgname)
This page took 0.036057 seconds and 5 git commands to generate.