mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 14:00:19 +02:00
Signed-off-by: Tavi <tavi@divested.dev> Co-authored-by: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
15 lines
322 B
C
15 lines
322 B
C
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include "test_util.h"
|
|
|
|
OPTNONE int main(void) {
|
|
char *firstbuffer = malloc(32);
|
|
char *secondbuffer = malloc(16);
|
|
if (!firstbuffer && !secondbuffer) {
|
|
return 1;
|
|
}
|
|
memset(secondbuffer, 'a', 16);
|
|
memcpy(firstbuffer, secondbuffer, 32);
|
|
return 1;
|
|
}
|