#2590 Potential mem leak in TcpGetOptionProc if host name too long

obsolete: 8.4.5
closed-fixed
5
2004-02-25
2004-02-01
No

In unix/tclUnixChan.c, TcpGetOptionProc,
options -peername and -sockname.
if the size of the hostname returned by the system
causes Tcl to allocate memory for Tcl_DString 'ds',
that memory will never be freed.

I have tested this with:
while {1} {fconfigure $sock -peername}
hostname <= 195 chars - ok
hostname > 195 chars - memory leak

Patch included for Tcl-8.4.5

Stu

Discussion

  • Donal K. Fellows

    • milestone: --> obsolete: 8.4.5
    • assigned_to: andreas_kupries --> dkf
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks