[quagga-dev 4409] Re: Segfault in lib/smux.c
pierre-yves at spootnik.org
Tue Sep 26 15:05:58 BST 2006
> On Tue, Sep 26, 2006 at 03:51:08PM +0200, Pierre-Yves Ritschard wrote:
>> >> here's a patch that fixes all calls to asn_build_int in lib/smux.c
> That looks good. Should we also patch this?
> --- lib/smux.c.orig 2006-09-26 10:04:20.211932000 -0400
> +++ lib/smux.c 2006-09-26 10:07:05.745600000 -0400
> @@ -1026,7 +1026,7 @@ smux_trap (oid *name, size_t namelen,
> ptr = asn_build_string (ptr, &len,
> (ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_IPADDRESS),
> - (u_char *)&addr, sizeof (struct in_addr));
> + (u_char *)&addr, sizeof(addr));
> /* Generic trap integer. */
> val = SNMP_TRAP_ENTERPRISESPECIFIC;
I went only through the asn_build_int, so here goes a patch that includes it.
Looking at the remaining asn_build_xxx calls, there's a lot of ugly and
error-prone pointer arithmetics too in asn_build_sequence calls, I need to
read a bit more though to find an elegant alternative.
Thanks for your time.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1817 bytes
Desc: not available
More information about the Quagga-dev