mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-23 02:05:07 +03:00
Make sure namelen fits into buffer allocated on stack
This commit is contained in:
parent
0237724e17
commit
4687bd1015
@ -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