diff --git a/infer/tests/codetoanalyze/cpp/bufferoverrun/std_array.cpp b/infer/tests/codetoanalyze/cpp/bufferoverrun/std_array.cpp index 7440e710d..aba4ad3ba 100644 --- a/infer/tests/codetoanalyze/cpp/bufferoverrun/std_array.cpp +++ b/infer/tests/codetoanalyze/cpp/bufferoverrun/std_array.cpp @@ -39,3 +39,15 @@ void new_int3_Bad() { int32_t* dst; dst = new int32_t[len]; } + +void std_array_contents_Good() { + std::array a; + a[0] = 5; + a[a[0]] = 0; +} + +void std_array_contents_Bad_FN() { + std::array a; + a[0] = 10; + a[a[0]] = 0; +}