mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
15 lines
323 B
C
15 lines
323 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "test_util.h"
|
|
|
|
OPTNONE int main(void) {
|
|
char *firstbuffer = malloc(16);
|
|
char *secondbuffer = malloc(32);
|
|
if (!firstbuffer && !secondbuffer) {
|
|
return 1;
|
|
}
|
|
memset(secondbuffer, 'a', 32);
|
|
memmove(firstbuffer, secondbuffer, 32);
|
|
return 1;
|
|
}
|