mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: fix buffer size usage
Count with extra 1 byte for buffer end '\0'.
This commit is contained in:
parent
44a2f2df92
commit
f443d16fd7
@ -172,7 +172,7 @@ static int _is_open_in_pid(pid_t pid, const char *path)
|
|||||||
if (pid_dp->d_name[0] == '.')
|
if (pid_dp->d_name[0] == '.')
|
||||||
continue;
|
continue;
|
||||||
if ((len = readlinkat(dirfd(pid_d), pid_dp->d_name, link_buf,
|
if ((len = readlinkat(dirfd(pid_d), pid_dp->d_name, link_buf,
|
||||||
sizeof(link_buf))) < 0) {
|
(sizeof(link_buf) - 1))) < 0) {
|
||||||
log_error("readlink failed for " DEFAULT_PROC_DIR
|
log_error("readlink failed for " DEFAULT_PROC_DIR
|
||||||
"/%d/fd/.", pid);
|
"/%d/fd/.", pid);
|
||||||
goto bad;
|
goto bad;
|
||||||
|
Loading…
Reference in New Issue
Block a user