All of lore.kernel.org
 help / color / mirror / Atom feed
* main - gcc: ensure buffer ends with 0
@ 2021-03-19 23:17 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2021-03-19 23:17 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d37b19aaaab0c28f4d1e4ae0690c73c0031a027b
Commit:        d37b19aaaab0c28f4d1e4ae0690c73c0031a027b
Parent:        79d8d06217b6e0ac2ef8d0303ce84f748faebb9b
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Thu Mar 18 23:08:08 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 19 23:21:18 2021 +0100

gcc: ensure buffer ends with 0

---
 lib/commands/toolcontext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 92008a641..75634caff 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -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)



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-19 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19 23:17 main - gcc: ensure buffer ends with 0 Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.