bsnmpd: Fix size of trapsink::comm to match other community arrays

This fixes a number of possible strcpy() buffer overruns between the various
community strings in trap.c.

Reported by:	Coverity
CIDs:		1006820, 1006821, 1006822
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
cem 2016-05-11 17:06:03 +00:00
parent 61b729e84b
commit 3109740c43

View File

@ -307,7 +307,7 @@ struct trapsink {
struct asn_oid index;
u_int status;
int socket;
u_char comm[SNMP_COMMUNITY_MAXLEN];
u_char comm[SNMP_COMMUNITY_MAXLEN + 1];
int version;
};
enum {