Commit 7eddefd8 authored by Matt McCormick's avatar Matt McCormick Untrusted array index read.

As reported by Coverity Scan, if the configured file contains a #include,

  Untrusted array index read
  The array index could be controlled by an attacker, leading to reads outside
  the bounds of the array.
  In main: Read from array at index computed using an unscrutinized value from
  an untrusted source (CWE-129)

  CID 1081283 (#1 of 1): Untrusted array index read (TAINTED_SCALAR)
  25. tainted_data: Using tainted variable "testToRun" as an index into an array
parent 1d9af198
......@@ -137,6 +137,13 @@ int main(int ac, char *av[])
int result;
if (testToRun < 0 || testToRun >= NumTests)
"testToRun was modified by TestDriver code to an invalid value: %3d.\n",
return -1;
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
return result;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment