[quagga-dev 4404] Re: Segfault in lib/smux.c
pierre-yves at spootnik.org
Tue Sep 26 14:28:10 BST 2006
> Wouldn't the proper fix generally be to call asn_build_int as follows?
> ptr = asn_build_int (ptr, &len,
> (u_char)(ASN_UNIVERSAL | ASN_PRIMITIVE | ASN_INTEGER),
> &val, sizeof (val));
> I think that's what the designers of the API had in mind to reduce
> the chance for mistakes. And that's the style used inside net-snmp.
> This style was followed in the lib/smux.c:smux_getresp_send function,
> but was sadly abandoned elsewhere...
I wondered about that too, I thought it would be best, but since sizeof
(int) was used before I thought it was a style decision, Here's a reworked
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 764 bytes
Desc: not available
More information about the Quagga-dev