From: <tcl...@tc...> - 2014-01-30 12:46:18
|
Repository: http://core.tcl.tk/tcl Change Notification For [tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ?] Ticket http://core.tcl.tk/tcl/tktview?name=4b3b7a30821038c72de6cbb4f96aa20dd8345613 Artifact http://core.tcl.tk/tcl/tinfo?name=39659cb9da3fd3cb1c0d72cff679864c284da483 On 2014-01-30T12:41:40 By anonymous Changed Fields assignee: nobody closer: nobody comment: 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. foundin: 8.5.15 is_private: 0 login: anonymous priority: 5 Medium private_contact: f533d94444fa1c1e17d8636ae60bdc0a92db0074 resolution: None severity: Minor status: Open submitter: anonymous subsystem: 47. Bytecode Compiler title: tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ? type: Bug |