#include <stdio.h>
#include <stdlib.h>
#define BUF 2
void *overflow(int payload) {
if (--payload) {
int *stack
= malloc(payload
* sizeof(int)); overflow(payload);
}
}
int main(void) {
overflow(BUF);
}
//https://pt.stackoverflow.com/q/236729/101
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2RlZmluZSBCVUYgMgoKdm9pZCAqb3ZlcmZsb3coaW50IHBheWxvYWQpIHsKICAgIGlmICgtLXBheWxvYWQpIHsKICAgIAlpbnQgKnN0YWNrID0gbWFsbG9jKHBheWxvYWQgKiBzaXplb2YoaW50KSk7CiAgICAJb3ZlcmZsb3cocGF5bG9hZCk7CiAgICB9Cn0KCmludCBtYWluKHZvaWQpIHsKICAgIG92ZXJmbG93KEJVRik7Cn0KCi8vaHR0cHM6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzIzNjcyOS8xMDE=