struct {
int n;
char c[0];
} *foo = malloc(16); /* sizeof(*foo) probably 4, so 12 bytes follow */
foo->n = 16;
for(int i = 0; i < 16; i++) { /* puts 16 bytes after foo->n. oops. */
foo->c[i] = 'a' + i;
}
Not that I don't love C for terseness and power or appreciate the systems one can build in it, but seriously.