summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-03-29 17:16:34 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-29 18:34:05 +0100
commit7db51a6bed8704ec634b44b4c5bd1dc35fdae86b (patch)
treef363dddc8843d161b82e10319c9b84969d2f610f
parent70bb72667889a2d6f250437e5db247eb111ca1aa (diff)
downloadlvm2-7db51a6bed8704ec634b44b4c5bd1dc35fdae86b.tar.gz
dmfilemapd: always terminate link buffer after readlink(2) (coverity)
-rw-r--r--daemons/dmfilemapd/dmfilemapd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/dmfilemapd/dmfilemapd.c b/daemons/dmfilemapd/dmfilemapd.c
index 3fd76b761..6e25c5ced 100644
--- a/daemons/dmfilemapd/dmfilemapd.c
+++ b/daemons/dmfilemapd/dmfilemapd.c
@@ -593,6 +593,7 @@ check_unlinked:
getpid(), fm->fd);
return 0;
}
+ link_buf[len] = '\0';
/*
* Try to re-open the file, from the path now reported in /proc/pid/fd.