[quagga-dev 4410] Re: Segfault in lib/smux.c

Andrew J. Schorr aschorr at telemetry-investments.com
Tue Sep 26 16:32:27 BST 2006

On Tue, Sep 26, 2006 at 04:05:58PM +0200, Pierre-Yves Ritschard wrote:
> I went only through the asn_build_int, so here goes a patch that includes it.

OK, that patch has been committed to CVS and should be in tomorrow's
CVS 0.99 snapshot.

   2006-09-26 Pierre-Yves Ritschard <pierre-yves at spootnik.org>

	   * smux.c: (smux_open,smux_trap,smux_register) Fix various
	     asn_build_* calls to pass the proper length in the final
	     argument: use sizeof(<variable>) instead of sizeof(<type>),
	     since there were several inconsistencies between the actual
	     variable type and the size that was passed.  This should
	     fix some problems on 64-bit architectures where sizeof(int)
	     != sizeof(long).

> 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.

Alright, please post if you figure out a better way to handle that stuff.

> Thanks for your time.

Thank you for finding and fixing the problem.


More information about the Quagga-dev mailing list