Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ca46ac177d7670dd77733525fb097e375cdba9a5
Ticket: 218679ffffffffffffffffffffffffffffffffff
Checked free and realloc abort on null pointers
User & Date: nobody on 2000-10-26 01:04:03
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1719 Bug
    Version: 8.0.4
    SubmitDate: '1999-04-05'
    LastModified: '1999-09-16'
    Severity: MED
    Status: Released
    Submitter: pat
    ChangedBy: hobbs
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '1999-09-16'
    FixedInVersion: 8.2.2
    ClosedDate: '2000-10-25'
    
    
    Name:  Steven Ryan
    email:  [email protected]
    Support:  None
    Severity:  3
    Synopsis:  Checked free and realloc abort on null pointers.
    
    ReproducibleScript:
    Tcl_DbCkfree(NULL,__FILE___,__LINE__) and
    Tcl_DbCkrealloc(NULL,1,__FILE__,__LINE__) abort with an illegal
    address (NULL).
    
    Comments:
    In Tcl_DbCkfree
    
        struct mem_header *memp = (struct mem_header *)
        (((unsigned long) ptr) - BODY_OFFSET);
    
    should be
    
        struct mem_header *memp;
    
        if (ptr == NULL) {
    return;
        }
    
        memp = (struct mem_header *)
        (((unsigned long) ptr) - BODY_OFFSET);
    
    
    In Tcl_DbCkrealloc
    
        struct mem_header *memp = (struct mem_header *)
        (((unsigned long) ptr) - BODY_OFFSET);
    
    should be
    
        struct mem_header *memp;
    
        if (ptr == NULL) {
    return Tcl_DbCkalloc(size, file, line);
        }
    
        memp = (struct mem_header *)
        (((unsigned long) ptr) - BODY_OFFSET);
    
    
    Added to 8.3b1. 
    -- 09/16/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0.4"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Checked free and realloc abort on null pointers"
  11. type changed to: "Bug"