Move memory corruption tests up a directory
This commit is contained in:
15
test/overflow_large_8_byte.c
Normal file
15
test/overflow_large_8_byte.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "test_util.h"
|
||||
|
||||
OPTNONE int main(void) {
|
||||
char *p = malloc(256 * 1024);
|
||||
if (!p) {
|
||||
return 1;
|
||||
}
|
||||
size_t size = malloc_usable_size(p);
|
||||
*(p + size + 7) = 0;
|
||||
free(p);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user