* bug-memory.c: fix the SIGSEGV unit test.
This commit is contained in:
parent
80d9efbd29
commit
0a902ca687
@ -23,7 +23,7 @@ int main(void)
|
|||||||
|
|
||||||
while((ch = getc(stdin)) != EOF)
|
while((ch = getc(stdin)) != EOF)
|
||||||
{
|
{
|
||||||
char *tmp = malloc(ch * 1024 * 1024);
|
char *tmp = malloc(1 + ch * 1024 * 1024);
|
||||||
for(i = 0; i < 1024; i++)
|
for(i = 0; i < 1024; i++)
|
||||||
tmp[ch * 1024 * i] = i;
|
tmp[ch * 1024 * i] = i;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user