[Dreamhack System Hacking] STAGE 12 - tcache_dup2
[혼자실습] tcache_dup2 #include #include #include #include char *ptr[7]; void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); } void create_heap(int idx) { size_t size; if( idx >= 7 ) exit(0); printf("Size: "); scanf("%ld", &size); ptr[idx] = malloc(size); if(!ptr[idx]) exit(0); printf("Data: "); read(0, ptr[idx], size-1); } void modify_heap() { size_t size, idx; pr..
2022. 4. 5.