In addition, I like this simple high water mark method: fill whole stack by some pattern like 0xAA (for example by debugger) and then run the code. Examine as many program paths as possible and then check the stack – you will see which part of the stack has been rewritten and you can adjust the size accordingly.
In addition, I like this simple high water mark method: fill whole stack by some pattern like 0xAA (for example by debugger) and then run the code. Examine as many program paths as possible and then check the stack – you will see which part of the stack has been rewritten and you can adjust the size accordingly.