mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmfilemapd: keep 1 byte for \0
Coverity noticed the buffer should have 1 byte for \0.
This commit is contained in:
parent
6c342abb7f
commit
dfc083d8d6
@ -589,7 +589,7 @@ check_unlinked:
|
||||
log_error("Could not format pid path.");
|
||||
return 0;
|
||||
}
|
||||
if ((len = readlink(path_buf, link_buf, sizeof(link_buf))) < 0) {
|
||||
if ((len = readlink(path_buf, link_buf, sizeof(link_buf) - 1)) < 0) {
|
||||
log_error("readlink failed for " DEFAULT_PROC_DIR "/%d/fd/%d.",
|
||||
getpid(), fm->fd);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user