From 7db51a6bed8704ec634b44b4c5bd1dc35fdae86b Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 29 Mar 2017 17:16:34 +0100 Subject: [PATCH] dmfilemapd: always terminate link buffer after readlink(2) (coverity) --- daemons/dmfilemapd/dmfilemapd.c | 1 + 1 file changed, 1 insertion(+) 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.