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

Andrew J. Schorr aschorr at telemetry-investments.com
Tue Sep 26 15:09:21 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, 
 			  (u_char)
 			  (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;


Regards,
Andy



More information about the Quagga-dev mailing list