On 28/01/2013 2:07 p.m., Amos Jeffries wrote:
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

With no objections, this is applied to trunk a rev.12641.

Amos

Reply via email to