Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 07204d1749d55fb8d12f07975e096d2c004e58ac
Ticket: 624919ffffffffffffffffffffffffffffffffff
Tcl_AppendToObj docs confusing
User & Date: mahlonstacy on 2002-10-22 00:25:04
Changes

  1. icomment:
    Logged In: YES 
    user_id=595029
    
    No, I don't think so.
    
    strlen(buffer) is 7; i = 7
    range of buffer[] is 0 - 6
    buffer[7] = NULL sets the 8th char to NULL
    i++ increments the length to 8;
    in this example, buffer[7] was already null because we used
    strcpy. But in my working program, the values are not null 
    terminated, they are described by length. Using the construct 
    above just guarantees a null at the end of the value.
    Also, buffer is declared as an array... there's no overrun.
    
    
    
    
  2. login: "mahlonstacy"
  3. mimetype: "text/plain"
  4. username: "mahlonstacy"