array index out of bounds: Added todo test case TestBufferOverrun::array_index_13 for ticket #118
This commit is contained in:
parent
4296548129
commit
91011b8450
|
@ -82,6 +82,7 @@ private:
|
|||
TEST_CASE(array_index_10);
|
||||
TEST_CASE(array_index_11);
|
||||
TEST_CASE(array_index_12);
|
||||
// TODO TEST_CASE(array_index_13); ticket #118
|
||||
|
||||
TEST_CASE(buffer_overrun_1);
|
||||
TEST_CASE(buffer_overrun_2);
|
||||
|
@ -381,6 +382,21 @@ private:
|
|||
}
|
||||
|
||||
|
||||
void array_index_13()
|
||||
{
|
||||
check("typedef unsigned char U8;\n"
|
||||
"typedef unsigned long U32;\n"
|
||||
"\n"
|
||||
"void foo()\n"
|
||||
"{\n"
|
||||
" U32 data[21];\n"
|
||||
" memory[pos++] = (U8) data[2];\n"
|
||||
" sprintf( buf2, \" %s = V%d\n\", outputIO[data[0]], data[2] );\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS(std::string(""), errout.str());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue