Event overrun-local: Overrun of static array "buf" of size 255 at position 255 with index variable "namelen" Also see events: [assignment]
116 buf[namelen] = '\0'; Signed-off-by: Angus Salkeld <[email protected]> --- tools/corosync-quorumtool.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/corosync-quorumtool.c b/tools/corosync-quorumtool.c index d43ae4a..f46e541 100644 --- a/tools/corosync-quorumtool.c +++ b/tools/corosync-quorumtool.c @@ -113,8 +113,10 @@ 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 ?? */ qtype = strdup(buf); -- 1.6.2.5 _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
