mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Make sure namelen fits into buffer allocated on stack
This commit is contained in:
parent
fbd89d3a1a
commit
4ea8533f30
@ -2323,6 +2323,9 @@ static if_type_t get_cluster_type(void)
|
||||
if (result != CS_OK)
|
||||
goto out;
|
||||
|
||||
if (namelen >= sizeof(buf))
|
||||
namelen = sizeof(buf) - 1;
|
||||
|
||||
buf[namelen] = '\0';
|
||||
type = parse_cluster_interface(buf);
|
||||
DEBUGLOG("got interface type '%s' from confdb\n", buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user