Other answers clearly show that this means some vulnerability for your program.
What can you learn from this? Let's pretend that
int func(void) { char buffer[1]; ...
In almost every implementation of the C compiler, the code created here creates a local area of the stack, and allows you to access this stack at the address specified in buffer . This stack also contains other important data. , for example: the address of the next line of code that will be run after the function returns to the caller.
So you could theoretically:
- Enter a lot of code into your input function,
- Create code that defines (in binary) a new function that does something ugly,
- Write down the correct return address (on the stack) with the address that the new function will have if you write it outside the buffers.
This is called a buffer overflow exploit , you can read it here (and in many other places).
source share