Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d97e5c91047dd521cd6ad56dbbae40c1e1015e98
Ticket: 3544658fffffffffffffffffffffffffffffffff
String constants, strlen and sizeof, oh my
User & Date: stwo on 2012-07-16 15:54:24
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Where do I begin with this one?
    
    tclUtil.c: In function 'UpdateStringOfEndOffset':
    tclUtil.c:3432: warning: array size (4) smaller than bound length (5)
    tclUtil.c:3432: warning: array size (4) smaller than bound length (5)
    
    Looking at commit [50bdab4682] we can see a variety of fun ways to play with strings, at least one of which is not really correct:
    char buffer[TCL_INTEGER_SPACE + sizeof("end") + 1];
    ...
    memcpy(buffer, "end", sizeof("end") + 1);
    
    And other interesting things like:
    #define TCL_CLOCK_PREFIX_LEN 14 /* == strlen("::tcl::clock::") */
    memcpy(cmdName, "::tcl::clock::", TCL_CLOCK_PREFIX_LEN);
    
    Also, the commit mentions "More ..." But I haven't found other occurrences of these changes.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "stwo"
  10. subsystem changed to: "69. Other"
  11. title changed to: "String constants, strlen and sizeof, oh my"
  12. type changed to: "Bug"