]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r310957,r310958,r310960:
authorngie <ngie@FreeBSD.org>
Sat, 7 Jan 2017 08:47:27 +0000 (08:47 +0000)
committerngie <ngie@FreeBSD.org>
Sat, 7 Jan 2017 08:47:27 +0000 (08:47 +0000)
commite7482bc1d4714d175bbbf7b05a49997db377de97
tree7fdfc50760ab55ce080f5e81debc703bdfa9ac6a
parent2cb44498088056d38bb9e7c7ca5ae817b650d87d
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
contrib/bsnmp/snmpd/export.c
contrib/bsnmp/snmpd/main.c
contrib/bsnmp/snmpd/trap.c