From ac3073e9fd3a1f26e46784e1a7096be48de9b967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 21 May 2007 18:04:19 +0000 Subject: [PATCH] Tests: Added 'TestBufferOverrun5' --- testbufferoverrun5/err.msg | 1 + testbufferoverrun5/testbufferoverrun5.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 testbufferoverrun5/err.msg create mode 100644 testbufferoverrun5/testbufferoverrun5.cpp diff --git a/testbufferoverrun5/err.msg b/testbufferoverrun5/err.msg new file mode 100644 index 000000000..f0ddcb231 --- /dev/null +++ b/testbufferoverrun5/err.msg @@ -0,0 +1 @@ +[testbufferoverrun5\testbufferoverrun5.cpp:8]: Array index out of bounds diff --git a/testbufferoverrun5/testbufferoverrun5.cpp b/testbufferoverrun5/testbufferoverrun5.cpp new file mode 100644 index 000000000..8cd4bdb05 --- /dev/null +++ b/testbufferoverrun5/testbufferoverrun5.cpp @@ -0,0 +1,11 @@ + + +const int SIZE = 10; + +void f() +{ + int i[SIZE]; + i[SIZE] = 0; +} + +