mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-04 07:40:52 +00:00
COVERITY 13: prevent buffer overrun in quorum-tool.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2546 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
870e4549df
commit
28f7c1e51f
@ -113,6 +113,9 @@ static const char *get_quorum_type(void)
|
||||
if (result != CS_OK)
|
||||
goto out;
|
||||
|
||||
if (namelen >= sizeof(buf)) {
|
||||
namelen = sizeof(buf) - 1;
|
||||
}
|
||||
buf[namelen] = '\0';
|
||||
|
||||
/* If strdup returns NULL then we just assume no quorum provider ?? */
|
||||
|
Loading…
Reference in New Issue
Block a user