squid/squid-SNMP.patch

18 lines
617 B
Diff

--- squid/src/snmp_core.cc 2014-06-25 16:41:39.000000000 +0200
+++ squid/src/snmp_core.cc 2014-09-09 11:52:13.237394779 +0200
@@ -375,12 +375,11 @@
len = comm_udp_recvfrom(sock,
buf,
- SNMP_REQUEST_SIZE,
+ SNMP_REQUEST_SIZE - 1,
0,
from);
if (len > 0) {
- buf[len] = '\0';
debugs(49, 3, "snmpHandleUdp: FD " << sock << ": received " << len << " bytes from " << from << ".");
snmp_rq = (SnmpRequest *)xcalloc(1, sizeof(SnmpRequest));