|
2014-01-31
| ||
| 09:19 | Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ? check-in: 0b5fb73910 user: jan.nijtmans tags: trunk | |
| 09:17 | • Closed ticket [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index bef... artifact: 1283f90580 user: jan.nijtmans | |
| 09:13 | Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ? check-in: f6a2f50eb8 user: jan.nijtmans tags: core-8-5-branch | |
|
2014-01-30
| ||
| 12:41 | • New ticket [4b3b7a3082] tcl8.5.15/generic/tclExecute.c:7713: array index before ... artifact: 39659cb9da user: anonymous | |
tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ?
Closed / Fixed4b3b7a30821038c72de6cbb4f96aa20dd8345613Created 13 years agoUpdated 13 years ago
Descriptionplain2014-01-30 12:41:40
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.
Referenced by2
0b5fb73910Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ? check-in2014-01-31 09:19:11f6a2f50eb8Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before sanity check ? check-in2014-01-31 09:13:13
jan.nijtmanswiki2014-01-31 09:17:41
Fixed in core-8-5-branch [f6a2f50eb8] and trunk [0b5fb73910]
Log in (anonymous is fine) to add a comment.