Modify the return address of the function
The function return address is easy to find after mastering the skill. We know from the memory profile in the book that the return address is in the memory block of EBP. So, on ollydbg, we find EBP directly according to the register window, and the next one in EBP is the return address of the function.
If you flood the address directly, the function will run wrong.
The overflow returned an invalid address.
Now officially do the input file that triggers the stack overflow.
Insert the completed input file and it will be successful.