From 3b9b3b241ee09f2e3603f8b055e8209cdc91a65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 7 Nov 2009 19:51:18 +0100 Subject: [PATCH] testbufferoverrun.cpp: minor updates to make it work better as extracted code --- test/testbufferoverrun.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/testbufferoverrun.cpp b/test/testbufferoverrun.cpp index f440a6b89..83e529a2d 100644 --- a/test/testbufferoverrun.cpp +++ b/test/testbufferoverrun.cpp @@ -1075,7 +1075,9 @@ private: void cin1() { - check("void f()\n" + check("#include \n" + "using namespace std;\n" + "void f()\n" "{\n" " char str[10];\n" " cin >> str;\n" @@ -1136,7 +1138,7 @@ private: check("void foo()\n" "{\n" - " char *s = malloc(10);\n" + " char *s = (char *)malloc(10);\n" " s[10] = 0;\n" "}\n"); ASSERT_EQUALS("[test.cpp:4]: (error) Array index out of bounds\n", errout.str());