]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r310957,r310958,r310960:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 7 Jan 2017 08:48:51 +0000 (08:48 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 7 Jan 2017 08:48:51 +0000 (08:48 +0000)
commit55302f3420aff66fbab34813e8fc0670660474bf
treec789b5814e35a5d7342ce2e20901e0667d88ae65
parent8aff3bdeeb6e29663099764dee4220098d5b83d9
MFC r310957,r310958,r310960:

r310957:

Use strlcpy when copying `com` to pdu->community to avoid potential
buffer overruns

CID: 10068231006824

r310958:

Initialize ret to SNMPD_INPUT_OK at the top of snmp_input_start(..) to
avoid returning an uninitialized value

There are some really complicated, snakey if-statements combined with
switch statements that could result in an invalid value being returned
as `ret`

CID: 1006551

r310960:

Similar to r310954, set .len to 0 on malloc failure and to `len` only
on success

git-svn-id: svn://svn.freebsd.org/base/stable/10@311597 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
contrib/bsnmp/snmpd/export.c
contrib/bsnmp/snmpd/main.c
contrib/bsnmp/snmpd/trap.c