Re: [PATCH] SNMP defects from Coverity

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 03 Feb 2013 21:54:54 +1300

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
Received on Sun Feb 03 2013 - 08:55:05 MST

This archive was generated by hypermail 2.2.0 : Mon Feb 04 2013 - 12:00:15 MST