Tcl Source Code

Ticket Change Details
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to
or submit via the online form by Aug 20.

Artifact ID: 39659cb9da3fd3cb1c0d72cff679864c284da483
Ticket: 4b3b7a30821038c72de6cbb4f96aa20dd8345613
tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ?
User & Date: anonymous 2014-01-30 12:41:40

  1. Change assignee to "nobody"
  2. Change closer to "nobody"
  3. Change cmimetype to "text/plain"
  4. Change comment to:

    I just ran the static analysis tool "cppcheck" over the source code of tcl8.5.15

    It said many things, including

    /home/dcb/rpmbuild/BUILD/tcl8.5.15/generic/tclExecute.c:7713 -> /home/dcb/rpmbuild/BUILD/tcl8.5.15/generic/tclExecute.c:7715: (warning) Array 'operatorStrings[34]' accessed at index 59, which is out of bounds. Otherwise condition 'opcode==99' is redundant.

    Source code is

    const char *description, *operator = operatorStrings[opcode - INST_LOR];
    if (opcode == INST_EXPON) { operator = "**"; }

    Suggest move sanity check of opcode to before its use.

  5. Change foundin to "8.5.15"
  6. Change is_private to "0"
  7. Change login to "anonymous"
  8. Change priority to "5 Medium"
  9. Change private_contact to "f533d94444fa1c1e17d8636ae60bdc0a92db0074"
  10. Change resolution to "None"
  11. Change severity to "Minor"
  12. Change status to "Open"
  13. Change submitter to "anonymous"
  14. Change subsystem to "47. Bytecode Compiler"
  15. Change title to:

    tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ?

  16. Change type to "Bug"