Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 177c0f651164751db9cb1bce2c2022f2c3f8c33b
Ticket: 888777ffffffffffffffffffffffffffffffffff
Potential mem leak in TcpGetOptionProc if host name too long
User & Date: stwo on 2004-02-01 23:41:26
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "stwo"
  9. subsystem changed to: "25. Channel System"
  10. title changed to:
    Potential mem leak in TcpGetOptionProc if host name too long
    
  11. type changed to: "Bug"