[PATCH] SNMP defects from Coverity

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 28 Jan 2013 14:07:47 +1300

Coverity has detected a long list of small defects in the snmp_core.cc code.
Lots of alignment, sizeof(), and memory uninitialized.

They all stem from a few uses of "sizeof(name)" where name is a pointer
to an OID object rather than the object itself. This code is present as
far back as squid-2.6 and probably a lot further.

I believe it has not been causing obvious problems due to the
sizeof(oid*) [4 or 8 octets] on a pointer being larger than the
sizeof(oid) [1 or 2 octets] on the object stored into the allocate memory.

Is anyone able to test the attached patch please?

Amos

Received on Mon Jan 28 2013 - 01:07:54 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 28 2013 - 12:00:12 MST