> 
> From: John Naylon <[EMAIL PROTECTED]>
> Date: 2004/10/05 Tue AM 09:43:49 EDT
> To: [EMAIL PROTECTED]
> CC: John Naylon <[EMAIL PROTECTED]>,  [EMAIL PROTECTED]
> Subject: Re: help for TCP,UDP, and IPv6 transports
> 
> Hello,
> 
> [EMAIL PROTECTED] said:
> MJS> Please review bug [ 1040429 ] memory leaked past f_fmtaddr calls
> 
>   This looks fine to me -- as Mike says, all fmtaddr methods return heap 
> memory which needs to be free()d.  I would suggest that in snmp_api.c and 
> snmp_agent.c that the relevant variable be set to NULL after being 
> free()d to make more obvious any code path that subsequently deferences 
> same (by causing a SEGV).

That implies there are subsequent dereferences.
There are a handful of places that I'll provide a patch for which will
further limit their scope, making such dereferences obvious and not
practical.  No need to set NULL in these cases..


Is it OK to apply bug# 1040429 fixes to 5.1 patches and main branch ?

> 
> [EMAIL PROTECTED] said:
> > It seems to me that it might also make sense to move the host_ctl stuff
> > into the transport code itself. 
> 
>   I like this idea a lot.  Probably the right thing to do would be to add 
> a method to the transport object that will perform the appropriate 
> checking if non-NULL.  NULL would imply "always succeeds" which is 
> probably appropriate for AAL5, IPX, callback.  This is a much simpler 
> test than "formatted string contains '['"!  The transport-specific code 
> can mangle strings more efficiently for passing to tcp_wrappers too.  
> Better encapsulation all round.
> 
>   Cheers all,
> 
> John
> -- 
> Dr. John Naylon
> Cambridge Broadband Ltd.  http://www.cambridgebroadband.com/
> 


Something like f_fmtaddr -- perhaps a f_testaddr() method that
would completely handle the logging of the error, and return
simply a TRUE/FALSE indication ?


But for 5.1, are the patches I've supplied sufficiently useful
to apply ?  There are folks using 5.1.2 today (eg. Debian, RedHat, BSD)
that would really like to take full advantage of the IPv6 transports.
The patch, while somewhat hokey (looking for left brace),
is low risk.

Thoughts ?


The new functions should be made for 5.3, I suspect,
_unless_ Dr. John has the MEP (Most Excellent Patch) available.

  %^)
-Mike Slifcak




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to