Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 320e4e95875eaca41cbebb25ac68f3f7d6ac99d4
Ticket: 218454ffffffffffffffffffffffffffffffffff
Array size bug in TeststringobjCmd in Tcl 8.1a2
User & Date: nobody on 2000-10-26 01:00:35
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 583 Bug
    Version: 8.1a2
    SubmitDate: '1998-05-21'
    LastModified: '1998-12-08'
    Severity: SER
    Status: Released
    Submitter: hershey
    ChangedBy: stanton
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '1998-12-08'
    FixedInVersion: 8.1b1
    ClosedDate: '2000-10-25'
    
    
    The array strings in TeststringobjCmd in tclTestObj.c in Tcl 8.1a2 is
    
    too small.  The call to Tcl_AppendStringsToObj refers to strings[11].
    
    However, the strings array is defined to have only 11 entries, which
    
    means that strings[11] is past the end of the array.
    
    
    
    I've appended the obvious patch.
    
    
    
    Ian
    
    
    
    *** tclTestObj.c.~1~    Fri Apr 10 15:44:54 1998
    
    --- tclTestObj.c        Fri Apr 10 15:45:32 1998
    
    *************** TeststringobjCmd(clientData, interp, obj
    
    *** 851,857 ****
    
          Tcl_Obj *CONST objv[];    /* Argument objects. */
    
      {
    
          int varIndex, option, i, length;
    
    ! #define MAX_STRINGS 10
    
          char *index, *string, *strings[MAX_STRINGS+1];
    
          static char *options[] = {
    
            "append", "appendstrings", "get", "get2", "length", "length2",
    
    --- 851,857 ----
    
          Tcl_Obj *CONST objv[];    /* Argument objects. */
    
      {
    
          int varIndex, option, i, length;
    
    ! #define MAX_STRINGS 11
    
          char *index, *string, *strings[MAX_STRINGS+1];
    
          static char *options[] = {
    
            "append", "appendstrings", "get", "get2", "length", "length2",
    
    
    
    The patch has been applied.
    
  4. foundin changed to: "obsolete: 8.1a2"
  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: "10. Objects"
  10. title changed to: "Array size bug in TeststringobjCmd in Tcl 8.1a2"
  11. type changed to: "Bug"