summaryrefslogtreecommitdiffstats
path: root/lib/libspl/include
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2018-04-04 10:16:47 -0700
committerBrian Behlendorf <[email protected]>2018-04-04 10:16:47 -0700
commit21a4f5cc867b4f166704df84985edc048caa2578 (patch)
tree18eb614a113f6a16c9ab5cd3c8247f2230b33cea /lib/libspl/include
parent1724eb62debfaa48f5861660615d49a994945d94 (diff)
Fedora 28: Fix misc bounds check compiler warnings
Fix a bunch of (mostly) sprintf/snprintf truncation compiler warnings that show up on Fedora 28 (GCC 8.0.1). Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #7361 Closes #7368
Diffstat (limited to 'lib/libspl/include')
-rw-r--r--lib/libspl/include/umem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h
index c63026cee..5b10ac801 100644
--- a/lib/libspl/include/umem.h
+++ b/lib/libspl/include/umem.h
@@ -146,7 +146,7 @@ umem_cache_create(
cp = umem_alloc(sizeof (umem_cache_t), UMEM_DEFAULT);
if (cp) {
- strncpy(cp->cache_name, name, UMEM_CACHE_NAMELEN);
+ strlcpy(cp->cache_name, name, UMEM_CACHE_NAMELEN);
cp->cache_bufsize = bufsize;
cp->cache_align = align;
cp->cache_constructor = constructor;