1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
struct s { int *a; int *b; }; void *malloc(int size); void f() { struct s a; a.a = malloc(10); if (a.b) { a.b[10] = 10; } } void g() { struct s a; a.a = malloc(10); if (a.a) { a.a[10] = 10; } } int main() { f(); }