Tcl Source Code

Ticket Change Details
Login
Overview

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
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed 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. foundin changed to: "8.5.15"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "f533d94444fa1c1e17d8636ae60bdc0a92db0074"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to:
    tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ?
    
  16. type changed to: "Bug"