Test: Buffer overrun

This commit is contained in:
Daniel Marjamäki 2007-05-21 09:54:42 +00:00
parent b570e3c81d
commit a48d8cad54
5 changed files with 25 additions and 2 deletions

View File

@ -2,6 +2,7 @@
void f()
{
char str[10];
str[10] = 0;
char str[0x10];
str[15] = 0;
str[16] = 0;
}

View File

@ -0,0 +1 @@
[testbufferoverrun2\testbufferoverrun2.cpp:7]: Buffer overrun

View File

@ -0,0 +1,8 @@
void f()
{
char str[50];
for (i = 0; i < 100; i++)
str[i] = 0;
}

View File

View File

@ -0,0 +1,13 @@
void f()
{
if (ab)
{
char str[50];
}
if (ab)
{
char str[50];
}
}